FastEdge lets you run WebAssembly on the Gcore edge network — close to your users, with cold starts measured in microseconds. In this guide you'll build your first worker from scratch.
Prerequisites
You'll need Rust installed and the wasm32-wasip1 target added:
rustup target add wasm32-wasip1
Create the Project
cargo new --lib my-fastedge-app
cd my-fastedge-app
Configure for WASM
Set the build target and add the FastEdge SDK to Cargo.toml:
# .cargo/config.toml
[build]
target = "wasm32-wasip1"
Write Your Handler
In src/lib.rs, create a simple HTTP handler:
use fastedge::{
body::Body,
http::{Request, Response, StatusCode, Error},
};
#[fastedge::http]
pub fn main(_req: Request) -> Result, Error> {
Response::builder()
.status(StatusCode::OK)
.header("content-type", "text/plain")
.body(Body::from("Hello from FastEdge!"))
}
Build and Deploy
cargo build --release
# Upload the wasm binary, then create the app via API
That's it! Your worker is now live on the global edge network.
Tip: Use
fastedge = "0.2" for the latest stable SDK. Check the official docs for advanced features.