JIT at the edge, blazing like the sun.
Helios is a Rust-based HTTP server and toolchain for running Workers-style JavaScript handlers at the edge. It provides multi-protocol HTTP serving (HTTP/1.1, HTTP/2, and HTTP/3), a built-in load-testing tool, and a Wizer-based WASM snapshot pipeline.
Status: v1.1.0-beta. The current release ships the full server, dispatch, and benchmarking infrastructure with JavaScript execution powered by the Boa ECMAScript engine. Full SpiderMonkey JIT integration is in active development for maximum performance.
A precompiled Linux (x86_64) binary is included at bin/helios.
# Serve a Workers-style JS handler
./bin/helios serve bench/helios-simple.js --port 8080
# In another terminal
curl http://127.0.0.1:8080/Requires Rust 1.75 or newer.
cd rs
cargo build --release
cd ..
./rs/target/release/helios serve bench/helios-simple.js --port 8080Helios uses the Workers fetch event API:
addEventListener('fetch', (event) => {
event.respondWith(new Response('Hello from Helios!'));
});Note: Full SpiderMonkey JIT execution is in development. The current build uses the Boa ECMAScript engine, which executes your handler JavaScript and returns the actual response body. SpiderMonkey JIT will provide higher throughput once integrated.
Static-response optimization: At startup, Helios probes your fetch handler by invoking it twice with synthetic requests (
GET http://localhost/andPOST http://localhost/other). If both calls produce identical 200 responses with no custom headers, the response is cached and served via a zero-JS raw-TCP fast path for maximum throughput. Handlers with side effects (counters, logging, external calls) will observe these probe invocations at boot time.
See bench/helios-simple.js for a minimal example and bench/complex.js for a more involved one.
helios serve <app.js> [-s] [--port 8080] [--workers N] [--policy round-robin|least-loaded|power-of-two]
[--ip ADDR] [--cert PATH --key PATH]
[--alt-svc 'h3=":8443"; ma=86400']
[--shutdown-timeout 60]
helios build <app.js> [-o app.wasm] [--worker-wasm helios-worker.wasm]
[--target wasip2] [--no-opt]
helios bench <url> [-d 30] [--warmup 3] [-c 64] [-R 50000]
[--http auto|http1|http2|http3]
[--body-file FILE] [--json]
helios exec <script.js> [-s]
Notes:
helios servefans requests across worker threads using a lock-free dispatcher. Default dispatch policy ispower-of-two.-s/--scriptruns the JS file in script mode (no module resolution). Applies to bothhelios serveandhelios exec.- HTTP/3 requires a TLS certificate and key (
--cert/--key) because QUIC mandates TLS 1.3. The--alt-svcflag sets theAlt-Svcresponse header to advertise the H3 endpoint to clients. helios buildinvokes Wizer to produce a pre-initialized WASM snapshot. RequireswizeronPATHand a compatiblehelios-worker.wasmcomponent.wasm-optis also required unless--no-optis passed.helios execruns a script once using the Boa JS engine and exits.
helios bench is a built-in closed-loop load generator with HDR-histogram latency tracking and optional coordinated-omission correction.
- Baseline: 87,800 req/s, p50=0.716ms
- Optimized: 135,812 req/s, p50=0.462ms (+54% throughput, -35% latency)
- Peak (128 conns): 149,504 req/s, p50=0.809ms
- Peak (256 conns): 164,387 req/s, p50=1.457ms
Static-response handlers (constant output regardless of request) are automatically detected at startup and served via a zero-allocation raw TCP fast path — no JS execution per request.
# Start the server
./bin/helios serve bench/helios-simple.js --port 8080
# Run a benchmark
./bin/helios bench http://127.0.0.1:8080/ \
--duration 15 \
--warmup 2 \
--connections 64 \
--rate 20000 \
--jsonFor runtime comparisons, use the provided parity servers with the same flags:
# These servers also listen on port 8080; stop helios (or use a different port) before running them.
node bench/node-simple.js # port 8080
bun bench/bun-simple.js # port 8080| Path | Contents |
|---|---|
bin/helios |
Precompiled Linux x86_64 binary. |
rs/ |
Rust workspace source (helios crate). |
bench/ |
JS handler fixtures and Node/Bun comparison servers. |
assets/ |
Project graphics. |
LICENSE |
MIT license. |
Helios is licensed under the VRIL LABS Open Source License. See LICENSE or vril.li/license.
"WinterJS promised the sun. Helios delivers it."