// readme

datastar.zig - A Web Framework for Zig 0.17

A Datastar-aware HTTP server for Zig 0.17. using Datastar v1.0.3

Build realtime collaborative web apps where the backend pushes DOM patches, signal updates, and browser scripts to connected clients over a fast SSE pipe. Single binary, no JS bundler, no frontend framework.

  • Complete HTTP server in a single binary. Radix-tree router, per-request arena, batched + sync SSE, hot reload during development, *HTTPRequest API that knows about Datastar. zig build && ./your-app and you’re serving reactive HTML.
  • BYO IO backends, build-time selectable. Default std.Io.Threaded (OS threads) for portability. -Dio=zio for stackful coroutines on N-executor scheduler. Same handler code, different concurrency model β€” see Selecting the IO backend and the bench numbers.
  • Bundled in-process pub/sub. pubsub.zig is wired in by default β€” enough to do CQRS in a single binary, with a clean off-ramp to NATS / Redis / Postgres LISTEN-NOTIFY when you outgrow it. See [Pub/Sub and…