Build the Web Assembly
This step should feel familiar, we are going to use
cargo
to compile our bincode_parser
library and then use wasm-bindgen
to generate our js
bindings.
$ cargo +nightly build --target wasm32-unknown-unknown
$ wasm-bindgen ./target/wasm32-unknown-unknown/debug/bincode_parser.wasm --out-dir .
After this you should have a file called
bincode_parse_bg.wasm
and bincode_parser.js
in your project's root.