Developers: Getting started building Rust + JavaScript hybrid apps for Node.js using the ssvmup
tool.
A one-stop tool for building Rust functions into WebAssembly (the Second State VM, or SSVM) and then accessing these functions from Node.js JavaScript.
From Linux command line
curl https://raw.githubusercontent.com/second-state/ssvmup/master/installer/init.sh -sSf | sh
From NPM and Node.js
npm i -g ssvmup
To build Rust functions for Node.js applications, use the following command. See a template application. The ssvmup compiles and generates the wasm file, and the corresponding JavaScript file to call wasm functions from JavaScript.
$ ssvmup build
To build Rust functions for Deno applications, use the following command. See a template application.
$ ssvmup build --target deno
ssvmup
uses env_logger
to produce logs when ssvmup
runs.
To configure your log level, use the RUST_LOG
environment variable. For example:
RUST_LOG=info ssvmup build
This project is derived from the open source wasm-pack.