/rust-cli-app-example

Example CLI app written in rust for Wamer

Primary LanguageRust

rust-cli-app-example

A demonstration application. This shows how one can create command-line apps in WebAssembly with Emscripten, Rust, and Wasmer.

Build

Install Wasmer with:

curl https://get.wasmer.io -sSfL | sh

Install and setup Emscripten in the CLI app build environment. See the emscripten installation instructions. Run the setup script wherever running cargo commands. Build the project in debug mode (the default).

cargo build

Run

Run with Wasmer:

wasmer run ./target/wasm32-unknown-emscripten/debug/rust_cli_app_example.wasm