Bring your Worker to native.
Sproutboat compiles a Cloudflare Workers fetch handler with
Porffor into one Linux executable.
Install
$ npm i -g sproutboat
Your handler, compiled.
Start with a fetch handler. Build a native Linux executable with the CLI.
See how to build it →export default {
fetch(request) {
const url = new URL(request.url);
const name = url.searchParams.get("name") || "world";
return new Response(`Hello, ${name}!\n`);
},
};
export default {
fetch(request) {
const key = new URL(request.url).pathname.slice(1);
if (request.method === "PUT") {
env.NOTES.put(key, request.body || "");
return new Response("saved\n", { status: 201 });
}
const value = env.NOTES.get(key);
if (value === null) return new Response("", { status: 404 });
return new Response(value);
},
};
export default {
fetch(request) {
if (request.method === "POST") {
const { title } = JSON.parse(request.body || "{}");
env.DB.prepare("INSERT INTO todos (title) VALUES (?)")
.bind(title).run();
}
const todos = env.DB.prepare("SELECT * FROM todos").all();
return new Response(JSON.stringify(todos.results), {
headers: { "content-type": "application/json" },
});
},
};
$ sproutboat build --standalone
The same Worker on three runtimes
One Worker-style app, run directly on Node, workerd and a Sproutboat v0.18.0 executable on the same Linux host. Every response is checked.
| Node | workerd | Sproutboat | |
|---|---|---|---|
| Footprint | |||
| Idle memory (PSS) | 52.3 MiB | 46.5 MiB | 7.44 MiB |
| Size on disk, app plus runtime | 141 MiB | 128 MiB | 4.60 MiB |
| Speed | |||
| Start to first correct response | 248 ms | 53.6 ms | 12.0 ms |
| p95 latency, JSON orders | 5.51 ms | 5.29 ms | 2.58 ms |
| p95 latency, 10% wait on a 50 ms upstream | 55.2 ms | 53.6 ms | 56.8 ms |
| Cost | |||
| CPU time per 1,000 requests | 2,585 ms | 1,654 ms | 1,159 ms |
Medians of 3 rounds at a fixed 50 requests/s, run on 2026-10-20. Green marks the lowest value in each row. This is not a maximum-throughput test or a comparison with hosted Cloudflare Workers. Raw samples and method
Two ways to run it
One executable
sproutboat build --standalone emits a Linux executable with SQLite and TLS
compiled in. Copy it to a host and run it.
Your own platform
A control plane on your Linux box: TLS, a sandbox, rollbacks, logs, a dashboard and many deployments side by side.
Run the platformBoth support the same bindings except service bindings, which need the platform.