fastedge crate, Gcore’s original Rust library for FastEdge HTTP applications. Most existing FastEdge applications written in Rust use this SDK. Use this setup when working with existing applications built on the fastedge crate or when maintaining code that still targets wasm32-wasip1.
The crate provides the #[fastedge::http] entry-point macro together with APIs for environment variables, secrets, key-value storage, dictionary access, and cache integration.
Rust and Cargo are required. On Windows, also install Visual Studio Build Tools with the Desktop development with C++ workload.
For new applications, the Modern Rust SDK (
wstd, wasm32-wasip2) is the recommended direction — it uses the WASI-HTTP standard and reduces dependency on Gcore-specific tooling.Add the WebAssembly target
The Legacy SDK compiles towasm32-wasip1. Add the target once — it applies to all future builds:
Configure a project
FastEdge applications compile to WebAssembly libraries rather than standalone executables. Two changes from the Cargo defaults are needed: the output type must becdylib, and the fastedge crate must be listed as a dependency.
-
Create the library crate:
-
Replace the contents of
Cargo.toml:crate-type = ["cdylib"]changes the output to a format the FastEdge runtime can load.fastedge = "0.4"provides the entry-point macro and access to FastEdge-specific APIs.anyhowis used for error handling in the verification example below.
Verify the toolchain
A minimal handler is enough to confirm the toolchain produces a valid WebAssembly binary. Replacesrc/lib.rs:
./target/wasm32-wasip1/release/my_app.wasm. That file can be uploaded to FastEdge directly or used as the starting point for the next tutorial.