The ssvmup tool
The compiler toolchain for Rust functions in JavaScript
Last updated
Was this helpful?
The compiler toolchain for Rust functions in JavaScript
Last updated
Was this helpful?
Throughout our examples, we make extensive use of the tool. It is inspired by the wasm-pack project but is optimized for server-side applications. Specifically, it supports the WebAssembly virtual machine and Deno host runtime.
The uses wasm-bindgen
to automatically generate the “glue” code between JavaScript and Rust source code so that they can communicate using their native data types. Without it, the function arguments and return values would be limited to very simple types (i.e., 32-bit integers) supported natively by WebAssembly. For example, without and wasm-bindgen
.
The easiest way to install is through .
You could also install as a standalone tool for runtimes such as Deno. You need to have Rust installed before running the command below.
Next, to use ssvmup to build Rust functions for Node.js and Deno applications.