apt-get install gcc libssl-dev pkg-config lld
ℹ 「wdm」: Compiled successfully.
, open your browser to http://localhost:8080/
This will also automatically watch the rust code in ./src/
and incrementally rebuild on changes. If you're lucky, your web browser will also automatically reload after a successful build.
This guide has a few pointers. I got ~20% faster compiles by following it: https://bevyengine.org/learn/book/getting-started/setup/#enable-fast-compiles-optional
A template for kick starting a Rust and WebAssembly project using wasm-pack.
Tutorial – wasm-pack-template discord
📚 Read this template tutorial! 📚
This template is designed for compiling Rust libraries into WebAssembly and publishing the resulting package to NPM.
Be sure to check out other wasm-pack
tutorials online for other
templates and usages of wasm-pack
.
wasm-pack build
wasm-pack build
wasm-pack test
wasm-pack test --headless --firefox
wasm-pack publish
wasm-pack publish
wasm-bindgen
for communicatingconsole_error_panic_hook
wee_alloc
, an allocator optimized