Install dependencies
Install wasm-pack
cargo install wasm-pack
Install dependencies
yarn
Build web wasm
MacOS
brew install llvm
LLVM_PATH=$(brew --prefix llvm)
AR="${LLVM_PATH}/bin/llvm-ar" CC="${LLVM_PATH}/bin/clang" yarn wasm
yarn wasm
Run web
yarn build
yarn dev
Usage notice
If you get error: RuntimeError: Atomics.wait cannot be called in this context
please see Caveats
wasm-pack test
🔬 Test in Headless Browsers with wasm-pack test --headless --firefox
wasm-pack publish
🎁 Publish to NPM with wasm-pack publish
🔋 Batteries Included
-
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.