0.1.0 • Published 3 years ago
rust-webasm-spike v0.1.0
Rust Assembly Spike
This project was automatically generated based off of the wasm-pack-template
following the instructions here
The template is designed for compiling Rust libraries into WebAssembly and publishing the resulting package to NPM.
Prerequisites
- Install Rust and corresponding tools as per the guidance here
- Install the WebAssembly pack from here
- Install
cargo-generate
using this command:cargo install cargo-generate
- Install
npm
using this command:npm install npm@7.0.3 -g
Build
wasm-pack build
Test in Headless Browsers
wasm-pack test --headless --firefox
Publish to NPM
wasm-pack publish
Additional Dependencies
wasm-bindgen
for communicating between WebAssembly and JavaScript.console_error_panic_hook
for logging panic messages to the developer console.wee_alloc
, an allocator optimized for small code size.
0.1.0
3 years ago