Skip to main content
The Modern Rust SDK is the recommended approach for new FastEdge HTTP applications. It is based on WASI-HTTP, the standard WebAssembly interface for HTTP applications, and uses the wstd crate, which provides Rust bindings for WASI-HTTP. Rust and Cargo are required. On Windows, also install Visual Studio Build Tools with the Desktop development with C++ workload.
Existing apps built with the fastedge crate and wasm32-wasip1 use a different setup — covered in the Legacy Rust guide.

Add the WebAssembly target

FastEdge runs applications compiled to wasm32-wasip2. Add the target once — it applies to all future builds:

Configure a project

FastEdge applications compile to WebAssembly libraries rather than standalone executables, so start with a Rust library project. Two changes from the defaults are needed: the output type must be cdylib (a format the WASI runtime can load), and wstd must be listed as a dependency.
  1. Create the library crate:
  2. Replace the contents of Cargo.toml:
    Without crate-type = ["cdylib"], the build succeeds but the output can’t run as a FastEdge application.

Verify the toolchain

A minimal handler is enough to confirm the toolchain produces a valid WebAssembly component. Replace src/lib.rs:
Build it:
The first build downloads dependencies and takes one to two minutes. When it completes without errors, the toolchain is ready — the compiled binary is at ./target/wasm32-wasip2/release/my_app.wasm.