Rust has a pretty great WebAssembly story:
https://rustwasm.github.io/book/
Learning Rust at the same time as Rust+WebAssembly might be a bit of a reach, though.
https://rustwasm.github.io/book/
Learning Rust at the same time as Rust+WebAssembly might be a bit of a reach, though.
I don't do well with example-driven documentation like these. Resources like the original rust book are excellent though.
You can just target WebAssembly like this:
cargo +nightly build --target wasm32-unknown-unknown
# Install support for "wasm" command for cargo:
cargo install cargo-wasm
# Install wasm target and wasm-gc tool:
cargo wasm setup
# Create new wasm project:
cargo wasm new hello_world
and then in hello_world directory: # Build and run wasm project:
cargo wasm runHere's one guide: https://hackernoon.com/compiling-rust-to-webassembly-guide-4...