PRODSovereign European BaaS platformOpen Dashboard →

Engineering · 8 min read

Rust/WASM Edge Functions vs Cloudflare and Vercel Edge

Affane Daylami · Fondateur · June 22, 2026

Back to blog

Cloudflare Workers and Vercel Edge Functions run your code in V8 isolates, a lightweight JavaScript context, not a container or virtual machine. Aurabase offers a second path, verified in its code: a wasm mode which directly executes Rust compiled in WebAssembly, natively, in the aura-functionsservice, via the Wasmtime runtime.

This English text was generated automatically from the French original and has not been reviewed yet.

However, Aurabase's default mode remains Deno (V8 Isolates too), as documented in Aurabase's Rust core. “Edge Functions in Rust” covers three different realities depending on the platform: a community SDK on the Cloudflare side, no official route on the Vercel side, a native execution mode with its own CLI on the Aurabase side. This comparison details the three architectures without mixing what is verified and what remains a platform objective.

The essentials

  • Aurabase offers two Edge Functions runtimes: deno (V8 Isolates, dedicated service, default mode) and wasm (Rust compiled, run natively via Wasmtime).
  • Cloudflare Workers runs on V8 isolates and can run WebAssembly in addition, notably via the workers-rscommunity SDK. It's not a dedicated native Rust runtime like Aurabase's wasm mode.
  • Vercel Edge Functions relies on the Edge Runtime, a subset of Node.js API on isolates V8: no official SDK or CLI to write the function itself in Rust.
  • Aurabase's wasm mode isolates each execution with a Wasmtime fuel CPU budget, a dedicated memory limit and a timeout per epoch, but does not currently expose any outgoing network access to the guest module.
  • Three different architectures for the same goal: start quickly and isolate each execution, without the cost of a complete container.
#
Context

V8 isolates and WASM modules: two sandboxing mechanics

A V8 isolate is a lightweight JavaScript execution context inside the same V8 engine: no new system processes, no new kernel to start. This is the mechanism that Cloudflare first made public for Workers, and which Vercel reuses for its Edge Runtime. The objective is the same on both sides: to avoid the cost of a container or a VM for each request.

A WebAssembly module meets the same need through a different mechanism. The WASM bytecode runs in a bounded linear memory, defined by the specification itself. The guest module cannot address outside this area, regardless of the source language (Rust, C, Go…) that produced the binary. It is this model that Wasmtime applies in the wasm mode of Aurabase, detailed below. For startup measurements between the two mechanics, see our file on WebAssembly cold start benchmarks.

#
WASM Runtime

What Aurabase wasm mode runs in production

Each Aurabase function carries a runtime field which is worth "wasm" or "deno". The invocation engine chooses the execution path accordingly:

runtime/dispatch.rsrust
// Dispatch according to runtime: WASM (wasmtime) or Deno (V8 Isolates via edge-runtime)
let resp = if func.runtime == "wasm" {
    state.runtime.invoke(&wasm_bytes, &func.code_hash, req).await?
} else {
    // Proxy to aura-edge-runtime — V8 Isolates (supabase/edge-runtime, MIT)
    proxy_to_edge_runtime(&state.config.edge_runtime_url, …).await?
};

The sandbox relies on three Wasmtime mechanisms combined. A CPU budget counted in “fuel”: each WASM instruction consumes it. A timeout applied in epoch increments: a dedicated thread increases the Wasmtime clock after the configured delay, which interrupts the current execution. A memory limit set via StoreLimits. The three terminals are configured when the engine is instantiated:

runtime/wasm.rsrust
let mut cfg = Config::new();
cfg.consume_fuel(true);
cfg.epoch_interruption(true);

// Memory bounded by StoreLimits, initial fuel = max_fuel,
// timeout = epoch increment after timeout_secs (dedicated thread)

The compiled module is cached by code_hash: the same deployed binary is not recompiled on each call. Each invocation nevertheless instantiates a new Store and instance. No state leaks from one call to the next. The surface area exposed to the guest module remains deliberately minimal, five host functions in total: aura.log, aura.get_input, aura.set_output, aura.get_env and a stub env.abort for AssemblyScript compatibility. No host functions expose outgoing network calls at this time.

Verified vs. product objective

The wasm mode is now suitable for pure calculation: validation, data transformation, scoring, analysis. A function that must call a third-party API (payment, email, external service) must still go through denomode. This is the default mode for Aurabase, and the recommended mode for migrating existing Deno code.

On the deployment side, the CLI compiles your crate locally before sending: aura functions new scaffolds a crate cdylib, aura functions deploy compiles it then sends it.

terminalbash
# Scaffolding: creates aurabase/functions/<name>/ (Cargo.toml crate-type = cdylib)
aura functions new my-fn

# cargo build --target wasm32-unknown-unknown --release, then upload
# POST /v1/functions/:project_id { runtime: "wasm", code: <wasm in base64> }
aura functions deploy my-fn
#
Cloudflare

Cloudflare Workers: isolates V8, with WebAssembly in addition

Cloudflare Workers natively run JavaScript and TypeScript in V8 isolates distributed across Cloudflare's global network. WebAssembly has been a first-class citizen since the beginning of the platform: a .wasm module can be imported directly into a Worker like any other module.

To write a Worker entirely in Rust, the most used route is the community SDK workers-rs, which compiles the code to wasm32-unknown-unknown and executes it in the Workers runtime. The difference with Aurabase's wasm mode is the available surface area. A Worker written in Rust via this SDK runs in the full Workers environment, and can therefore call fetch or other platform bindings. Aurabase's wasm mode starts from a deliberately reduced host surface (previous section).

#
Vercel

Vercel Edge Functions: a Node.js subset, no official Rust path

Vercel's Edge Runtime also runs code in V8 isolates, with a subset of standard Web APIs (fetch, Request/Response, crypto.subtle…) rather than the full Node.js environment. Native Node modules and arbitrary compilation toolchains have no place there.

The WebAssembly object is part of this subset: nothing prevents you from loading a .wasm binary and instantiating it by hand from a JavaScript or TypeScript function. But to our knowledge, Vercel does not publish any official SDK or CLI to directly write an Edge Function in Rust, unlike workers-rs on the Cloudflare side or aura functions deploy on the Aurabase side. The path remains possible, but entirely manual, without dedicated tools.

#
Security

Sandbox: WASM linear memory versus V8 isolation

A V8 isolate separates the code executed by a dedicated heap and its own context, within the same engine process. It is a proven mechanism, at the scale of millions of requests per second at Cloudflare and Vercel, but which remains a software isolation mechanism within a single JavaScript engine.

The WASM model isolates differently: each instance gets its own linear memory, a contiguous buffer outside of which no access is possible by construction of the binary format itself, independently of the engine that executes it. In the Aurabase runtime, each host function that manipulates a pointer provided by the guest module (aura.log, aura.get_env…) explicitly revalidates the bounds before any memory access. This is an additional defense in depth against a malicious or buggy module.

#
Overview

The three architectures, side by side

Aurabase (wasm)Cloudflare WorkersVercel Edge Functions
Execution modelNative WASM module, WasmtimeIsolate V8 + WASM as an optional moduleIsolate V8, Node.js subset
Rust in the foregroundYes, dedicated mode + CLIVia community SDK (workers-rs)No, no official route
Network access exiting the moduleNo, checked in the code (no network host function)Yes, via the full Workers environmentYes, standard fetch API
CPU budgetFuel Wasmtime, configurableCPU time limit per request (Cloudflare doc)Duration limit per summon (doc. Vercel)
Dedicated Rust deploymentaura functions deploy (cargo build local)wrangler + workers-rsNo official equivalent tool

Aurabase runtime specifications. Cloudflare and Vercel columns described from the documented public architecture of each platform (isolates V8, WebAssembly as build target).

#
Decision

Which runtime to choose according to your function

Pure calculation, without network calls: schema validation, data transformation, scoring, lightweight image generation. Aurabase's wasm mode is suitable directly, with a strict memory sandbox, an explicit CPU budget, and without dependence on an external service.

Function that calls a third-party API (payment, email, outgoing webhook). Aurabase's deno mode remains the default choice today, in the same way that a classic Cloudflare Worker or a Vercel Edge Function relies on fetch natively.

Team already invested in the Cloudflare ecosystem (KV, Durable Objects, R2). Staying on Workers makes sense; workers-rs allows you to introduce Rust gradually, without changing platforms.

Need a native Rust runtime managed end-to-end, with a dedicated CLI and the same language as the rest of the backend. This is the angle that documents in our Wasmtime vs Wasmer comparison, on the choice of the WebAssembly engine itself.

#
Frequently Asked Questions

FAQs

Can you write Aurabase Edge Functions in Rust?+
Yes, via wasm mode. The CLI will have functions new scaffolde a Rust crate (crate-type cdylib). The aura functions deploy command compiles it locally with cargo build --target wasm32-unknown-unknown --release, then sends the binary to the aura-functions service, which runs it natively with the Wasmtime runtime. This is not the default mode: by default, an Aurabase Edge Function runs in JavaScript/TypeScript (Deno runtime, V8 Isolates).
Does Cloudflare Workers really allow you to write functions in Rust?+
Yes, but indirectly: Cloudflare Workers natively executes JavaScript/TypeScript in V8 isolates. The workers-rs community SDK allows you to compile an entire Worker in Rust to WebAssembly, but this is not the most officially documented route. WASM complements a Worker there rather than completely replacing the JS model.
Does Vercel Edge Functions support WebAssembly or Rust natively?+
The Vercel Edge Runtime exposes standard Web APIs, including the WebAssembly object, so a .wasm module can be loaded and instantiated manually from a JavaScript/TypeScript function. But to our knowledge, Vercel does not publish any official SDK or CLI to write an Edge Function directly in Rust, unlike workers-rs on the Cloudflare side or aura functions deploy on the Aurabase side.
Can Aurabase wasm mode call a third-party API (payment, email, etc.)?+
Not today: the host functions exposed to the guest WASM module are the log, reading the input request and writing the output response, as well as reading the environment variables. For a function that needs to call an external API (network fetch), the Deno runtime (default) is the recommended path.

READY TO DEPLOY?

Your backend in five minutes.

No credit card required · 500 MB free · 50,000 MAU