mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-17 08:42:28 +00:00
progress
This commit is contained in:
1 parent
41b9116c6a
commit
97d597e139
181 files changed
+1970
-2643
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# wasm
|
||||
|
||||
The engine of [`../gpx-rs`](../gpx-rs) for the browser: WebAssembly, exposed to the page through
|
||||
`wasm-bindgen`. Each exported function is a thin wrapper over `gpx_engine::api` (see `../gpx-rs/src/api`)
|
||||
that parses what the page sends and turns the result into JS objects (`src/convert.rs`, with
|
||||
`serde-wasm-bindgen`) or typed arrays. The storage in the browser (IndexedDB) is here too, as it
|
||||
is specific to the browser.
|
||||
|
||||
```
|
||||
wasm-pack build --target bundler
|
||||
```
|
||||
|
||||
The website imports the result as `gpx-wasm` (`pkg/`). The functions are tested in Node (it needs
|
||||
`wasm-pack`, which fetches the test runner the first time):
|
||||
|
||||
```
|
||||
wasm-pack test --node
|
||||
```
|
||||
|
||||
`src/ts.rs` declares the TypeScript types of the objects that cross.
|
||||
Reference in new issue
Block a user