Skip to Content
DocumentationLanguage GuideRustInstallation
WASIX / LANGUAGE GUIDE

Install WASIX for Rust

cargo-wasix  adds a wasix subcommand to Cargo, so you can build, run, and test Rust applications for WASIX with familiar commands.

Prerequisites

Install Rust using rustup . Both cargo and rustup must be available in your terminal.

Install cargo-wasix

cargo install cargo-wasix

The WASIX Rust toolchain downloads automatically the first time you run a command such as cargo wasix build. You do not need to install it separately.

Prebuilt installers for macOS, Linux, and Windows are also available in the official installation guide .

Verify installation

cargo wasix --version

Build your first project

cargo new hello-wasix cd hello-wasix cargo wasix build --release

Run with Wasmer

Install Wasmer , then run the release build from the project directory:

wasmer run target/wasm32-wasmer-wasi/release/hello-wasix.wasm

Replace hello-wasix with your project’s binary name if you are using an existing project. Cargo places WASIX release builds in target/wasm32-wasmer-wasi/release/ by default.

You can also build and run directly through cargo-wasix:

cargo wasix run

You can also run your project’s tests:

cargo wasix test

Next steps