Skip to content
This repository was archived by the owner on Sep 12, 2023. It is now read-only.
/ rustwasmc Public archive

Tool for building Rust functions for Node.js. Combine the performance of Rust, safety and portability of WebAssembly, and ease of use of JavaScript.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

second-state/rustwasmc

Repository files navigation

ssvmup

The Second State VM ready tool

npm npm GitHub language count GitHub top language

Developers: Getting started building Rust + JavaScript hybrid apps for Node.js using the ssvmup tool.

About

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.

Install

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

Usage

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

Logging

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

Acknowledgment

This project is derived from the open source wasm-pack.