Throughout our examples, we make extensive use of the ssvmup tool. It is inspired by the wasm-pack project but is optimized for server-side applications. Specifically, it supports the SSVM WebAssembly virtual machine and Deno host runtime.
The ssvmup uses
The ssvmup depends on the Rust cargo toolchain to compile Rust source code to WebAssembly. You must have Rust installed on your machine.
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh $ source $HOME/.cargo/env
Then, use the commands below to bring your operating system up to date with the latest developer tools. The commands here are tested on Ubuntu 20.04.
$ sudo apt-get update $ sudo apt-get -y upgrade $ sudo apt install build-essential curl wget git vim libboost-all-dev
$ npm install -g ssvmup # Append --unsafe-perm if permission denied
You could also install ssvmup as a standalone tool for runtimes such as Deno. You need to have Rust installed before running the command below.
$ curl https://raw.githubusercontent.com/second-state/ssvmup/master/installer/init.sh -sSf | sh
$ ssvmup build
To build Rust functions for Deno applications, use the following command. See a template application.
$ ssvmup build --target deno