WebAssembly build of the heading_hash
transform
This is a WebAssembly build of the heading_hash
transform, suitable for use in Nodejs and browsers.
Initial setup
Install wasm-pack.
The wasm-pack site recommends curling into your shell to install, but I prefer using cargo:
cargo install wasm-pack
Once wasm-pack is installed, you can build, test, and publish this package.js
🛠️ Build with wasm-pack build
wasm-pack build --scope rhcp --out-name heading_hash --target nodejs
Default is a release build with optimizations and no debug info. Add --dev
for a debug build.
wasm-pack build docs
🔬 Test in Headless Browsers with wasm-pack test
wasm-pack test --headless --firefox
wasm-pack test docs
🎁 Publish to NPM with wasm-pack publish
wasm-pack publish -a public --tag latest
wasm-pack publish docs