// the find
second-state/wasm-learning
Building Rust functions for Node.js to take advantage of Rust's performance, WebAssembly's security and portability, and JavaScript's ease-of-use. Demo code and recipes.
A collection of Rust + WebAssembly example projects targeting Node.js, Deno, browsers, and FaaS platforms. It's a learning resource from Second State, the company behind the SSVM (now WasmEdge) runtime. Aimed at developers who want to write performance-sensitive Rust code and call it from JavaScript without leaving the JS ecosystem.
Wide surface coverage — hello world through ML inference (MobileNet, TFLite, MTCNN) across Node, Deno, browser, and FaaS targets gives a realistic picture of where Wasm actually fits. The FaaS image-processing examples (watermark, grayscale, thumbnail) are concrete enough to adapt directly. Devcontainer setup means you can clone and have a working Rust + wasm-pack environment without fighting toolchain installs. The RSA and k-means examples show non-trivial use cases, not just string passing.
Tied heavily to Second State's own SSVM/ssvmup toolchain, which has since been rebranded to WasmEdge — several examples won't work out of the box with standard wasm-pack or wasm-bindgen without changes. Last pushed March 2024 and showing its age: no mention of the Component Model, WASI Preview 2, or wit-bindgen, which is where the ecosystem has moved. Binary ML model files committed directly to the repo (`.pb`, `.tflite`, `.onnx`) make cloning slow and bloated, and some examples mix Python utility scripts with Rust in ways that break the 'just Rust and JS' promise. No cross-platform CI that actually builds all the examples — the GitHub Actions badge covers only a subset.