Skip to main content
During FastEdge application development, deploying to the edge on every change is slow. fastedge-run eliminates that step: it runs the compiled Wasm binary locally and serves it over HTTP, so the application can be tested from the terminal without a new deployment.
The CLI is also bundled with the FastEdge VS Code extension. If you use VS Code, no separate installation is needed.

Install

Download a pre-built binary

Pre-built binaries are available for all major platforms on the FastEdge-lib releases page.
PlatformFile
macOS (Apple Silicon)fastedge-run-{version}-aarch64-apple-darwin.tar.gz
Linux (x86_64)fastedge-run-{version}-x86_64-unknown-linux-gnu.tar.gz
Windows (x86_64)fastedge-run-{version}-x86_64-pc-windows-msvc.zip
Download and extract the archive, then move the fastedge-run binary to a directory on your PATH.

Build from source

If no pre-built binary is available for your platform, build from source:
  1. Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
  1. Clone the repository and initialize submodules:
git clone https://github.com/G-Core/FastEdge-lib
cd FastEdge-lib
git submodule update --init --recursive -f
  1. Build the CLI:
cargo build --release
The binary is at ./target/release/fastedge-run.

Run a Wasm application

Start a local HTTP server that executes your compiled Wasm binary:
fastedge-run http -w ./app.wasm --port 8080
Then send requests to test the application:
curl http://localhost:8080

Pass environment variables

Set environment variables the same way they would be configured in the Customer Portal:
fastedge-run http -w ./app.wasm --env BASE=https://example.com --port 8080
Multiple variables can be passed by repeating --env:
fastedge-run http -w ./app.wasm --env KEY1=value1 --env KEY2=value2 --port 8080

Simulate geo headers

Inject sample geo data

Use --geo to add a fixed set of sample geo headers to every incoming request:
fastedge-run http -w ./app.wasm --geo --port 8080
The following headers are added to the request:
pop-continent: eu
pop-country-code: au
pop-country-name: luxembourg
pop-city: luxembourg
pop-reg: lu
pop-lat: 49.6113
pop-long: 6.1294
server_name: test.localhost

Inject specific headers

Use --headers to set individual headers with exact values. This is useful when testing logic that depends on a specific country code or region:
fastedge-run http -w ./app.wasm --headers pop-country-code=DE --headers pop-country-name=Germany --port 8080
Use fastedge-run http --help to see all available options.