https://github.com/acoyfellow/zero-cloudflare-hello
Run a Zero native executable on Cloudflare Containers. One-click deployable hello world.
https://github.com/acoyfellow/zero-cloudflare-hello
cloudflare cloudflare-containers edge systems-programming workers zero
Last synced: 12 days ago
JSON representation
Run a Zero native executable on Cloudflare Containers. One-click deployable hello world.
- Host: GitHub
- URL: https://github.com/acoyfellow/zero-cloudflare-hello
- Owner: acoyfellow
- License: mit
- Created: 2026-05-16T12:03:06.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-16T12:04:48.000Z (2 months ago)
- Last Synced: 2026-05-16T14:14:23.907Z (2 months ago)
- Topics: cloudflare, cloudflare-containers, edge, systems-programming, workers, zero
- Language: HTML
- Homepage: https://zero.coey.dev/about
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zero on Cloudflare
[](https://github.com/acoyfellow/zero-cloudflare-hello/actions/workflows/check.yml)
[](./LICENSE)
[](https://deploy.workers.cloudflare.com/?url=https://github.com/acoyfellow/zero-cloudflare-hello)
**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
```sh
curl https://zero.coey.dev
# hello from Zero on Cloudflare infra
```
The program behind that response:
```zero
pub fun main(world: World) -> Void raises {
check world.out.write("hello from Zero on Cloudflare infra\n")
}
```
## How it works
```txt
request → Worker → Container → Zero ELF → stdout response
```
Zero 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.
## Repo map
| Path | Purpose |
|---|---|
| [`hello.0`](hello.0) | Zero source. |
| [`artifacts/hello-linux-musl-x64`](artifacts/hello-linux-musl-x64) | 261-byte deployable ELF. |
| [`src/index.ts`](src/index.ts) | Worker → Container routing. |
| [`server.mjs`](server.mjs) | Container HTTP adapter. |
| [`Dockerfile`](Dockerfile) | Container image. |
| [`wrangler.jsonc`](wrangler.jsonc) | Cloudflare deployment config. |
## Deploy
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.
## Rebuild the Zero binary
```sh
curl -fsSL https://zerolang.ai/install.sh | bash
export PATH="$HOME/.zero/bin:$PATH"
npm run build:zero
```
## Scope
This 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.