Hi everyone,
I’m excited to share a project I’ve been working on: Caddy Reactor.
Repository: GitHub - pauloappbr/gojinn
What is it?
Reactor allows you to run Go, Rust, Zig, or Swift code directly inside your Caddy HTTP request flow using WebAssembly (via wazero).
It acts like a “self-hosted Cloudflare Workers” or “AWS Lambda”, but running in-process.
Why use it?
I built this to solve the gap between writing a native Caddy module (complex, unsafe memory sharing) and running a sidecar container (high latency/overhead).
Key Features:
Fast: Cold starts are <1ms (compared to ~1.5s for Docker containers).
Safe: Each request runs in a strict sandbox. If your handler crashes or loops infinitely, Reactor kills it without affecting Caddy.
Efficient: Zero memory footprint when idle.
HTTP Parity: Full control over Headers, Status Codes, and Body via a simple JSON protocol.
Benchmarks (Docker vs Reactor)
We ran a stress test calculating taxes on a JSON payload.
Docker Cold Start: ~1500ms
Reactor Cold Start: ~1ms ![]()
Artifact Size: 20MB (Docker) vs 3MB (Wasm)
How to use
Snippet de código
:8080 {
handle /api/* {
reactor ./functions/auth.wasm {
timeout 2s
memory_limit 50MB
env SECRET “my-key”
}
}
}
I would love to get feedback from the community. It’s currently in v0.1.0, implementing the core runtime and HTTP context switching.
Thanks! Paulo Henrique