A Zero native executable, running in a Cloudflare Container, exposed by a tiny Worker.
- Live: https://zero.coey.dev
- Source: https://github.com/acoyfellow/zero-cloudflare-hello
- Deploy: https://deploy.workers.cloudflare.com/?url=https://github.com/acoyfellow/zero-cloudflare-hello
curl https://zero.coey.dev
# hello from Zero on Cloudflare infraThe program behind that response:
pub fun main(world: World) -> Void raises {
check world.out.write("hello from Zero on Cloudflare infra\n")
}
request → Worker → Container → Zero ELF → stdout responseZero emits a Linux executable. Cloudflare Containers run Linux executables. The Worker forwards HTTP to a small container adapter, which runs the Zero binary and returns stdout.
| Path | Purpose |
|---|---|
hello.0 |
Zero source. |
artifacts/hello-linux-musl-x64 |
261-byte deployable ELF. |
src/index.ts |
Worker → Container routing. |
server.mjs |
Container HTTP adapter. |
Dockerfile |
Container image. |
wrangler.jsonc |
Cloudflare deployment config. |
Click the button above. It forks this repo and deploys the Worker + Container. First-time Containers can take a few minutes to become ready.
The tiny ELF is committed so one-click deploy does not need to install the experimental Zero compiler.
curl -fsSL https://zerolang.ai/install.sh | bash
export PATH="$HOME/.zero/bin:$PATH"
npm run build:zeroThis demonstrates Zero native output on Cloudflare Containers. Zero does not yet expose a production native HTTP server runtime, so the container includes a visible HTTP adapter.