0.1.0 • Published 5 years ago
@mattmayo/hello-wasm v0.1.0
Web Assembly with Rust
Here lies an example of how to create a wasm (web assembly) module by compiling Rust code. It is based on the following set of tutorials from Mozilla, who is a major sponsor of wasm.
How to execute
- Clone this repo
cd site/
npm install
npm run serve
- Use a modern browser to view http://localhost:8080/ (https://www.mozilla.org/en-US/firefox/new/)
How to compile the web site
- Install node
cd site
npm install
npm run serve
How to compile the Rust module (this is a bit more involved)
- Install rust https://www.rust-lang.org/tools/install
cargo install wasm-pack
npm adduser
to publish the rust module to npm (remember to update the package name in package json if you are publishing to your account)wasm-pack build --scope mynpmusername
0.1.0
5 years ago