---
title: "Install WASIX for Rust"
description: "cargo-wasix adds a wasix subcommand to Cargo, so you can build, run, and test Rust applications for WASIX with familiar commands."
url: "https://wasix.org/docs/language-guide/rust/installation/"
markdown: "https://wasix.org/docs/language-guide/rust/installation.md"
---

# Install WASIX for Rust

[cargo-wasix ](https://github.com/wasix-org/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 ](https://rustup.rs/). Both `cargo` and `rustup` must be available in your terminal.

## Install cargo-wasix

```sh
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 ](https://github.com/wasix-org/cargo-wasix#installation).

## Verify installation

```sh
cargo wasix --version
```

## Build your first project

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

## Run with Wasmer

[Install Wasmer ](https://docs.wasmer.io/install), then run the release build from the project directory:

```sh
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:

```sh
cargo wasix run
```

You can also run your project’s tests:

```sh
cargo wasix test
```

## Next steps

- Read the [Rust usage guide](https://wasix.org/docs/language-guide/rust/usage.md).
- Explore the [Rust examples](https://wasix.org/docs/language-guide/rust/examples.md).
- Browse [WASIX builds](https://wasix.org/builds.md) for package recipes and toolchains in wasinix.

---

[Documentation index](https://wasix.org/llms.txt) · [HTML version](https://wasix.org/docs/language-guide/rust/installation/)
