WebAssembly is a compilation target for "lower level" languages like: C/C++/Rust (and others).
This means that we can compile non-JS programs and run them in the browser.
Your classic JavaScript engine representation
Rust
Rust
Rust
Tooling (Compiler)
Rust
app.wasm
app.wasm
import fn1, fn2 ...
export data1, data2
app.wasm
import fn1, fn2 ...
export data1, data2
JS
const someData = {};
const someOtherData = {};
Array (ish) (Linear Memory)
72
101
108
...
Linear Memory
Pros:
Cons:
rustup -> Similar to npm's NVM, it is a way to simply switch between Rust versions
cargo -> Similar to npm, cargo is the official package manager for Rust
rustc -> Rust's compiler