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.12.0 executable on the same Linux host. Every response is checked.
| Node | workerd | Sproutboat | |
|---|---|---|---|
| Footprint | |||
| Idle memory (PSS) | 67.5 MiB | 46.2 MiB | 6.41 MiB |
| Size on disk, app plus runtime | 141 MiB | 128 MiB | 3.01 MiB |
| Speed | |||
| Start to first correct response | 185 ms | 39.1 ms | 13.6 ms |
| p95 latency, JSON orders | 4.57 ms | 2.89 ms | 2.78 ms |
| p95 latency, 10% wait on a 50 ms upstream | 54.3 ms | 53.5 ms | 56.9 ms |
| Cost | |||
| CPU time per 1,000 requests | 2,361 ms | 1,417 ms | 1,101 ms |
Medians of 3 rounds at a fixed 50 requests/s, run on 2026-09-30. 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.