Zero boilerplate
Databases, queues, auth and observability plug in with no glue code. Everything is wired through .env.
Zero is a batteries-included web framework for Zig. Wire REST, SQL, NoSQL, cache, pub/sub, auth, GraphQL and observability into a single static binary — configured almost entirely through .env.
zig fetch --save https://github.com/im-ng/zero/archive/refs/heads/main.zipDatabases, queues, auth and observability plug in with no glue code. Everything is wired through .env.
Compile to one dependency-free binary. Tiny RSS (~16–65 MiB), no managed runtime, ships anywhere, including Kubernetes.
ships anywhere ↘Structured JSON logs, Prometheus metrics, distributed tracing and health endpoints are wired in from the first request.
from req #1Tens of thousands of requests/sec at ~50 MiB RSS. No GC pauses, no JIT warm-up, explicit memory control.
no GC pauses!src/main.zigconfigs/.envzig build run gives you a JSON API with structured logs/metrics already live.Everything else (Postgres, Redis, Kafka, auth, GraphQL and metrics) is opt-in through configuration. Nothing to wire by hand.
Full walkthrough ~15 lines → running APIconst std = @import("std");
const zero = @import("zero");
const App = zero.App;
pub const std_options: std.Options = .{ .logFn = zero.logger.custom };
pub fn main(init: std.process.Init) !void {
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
const app = try App.new(arena.allocator(), init.io, init.environ_map);
try app.get("/json", jsonResponse);
try app.run();
}
fn jsonResponse(ctx: *zero.Context) !void {
try ctx.json(.{ .msg = "hello zero!" });
}App.new.Every piece is opt-in through configuration. Hover or focus a node to see what it does.
Hover or focus any node in the map to reveal what Zero wires in for you.
Drag the divider to compare a Zero service with a typical Go / Node setup.
← drag →
The bundled benchmark harness drives a concurrency ramp and reports throughput, latency percentiles and per-level RSS. CI runs it for regression.
One dependency-free binary. No GC. Everything else is configuration.
zig fetch --save https://github.com/im-ng/zero/archive/refs/heads/main.zip