About

Jetzig is a "batteries-included" MIT licensed web framework written in Zig .

Supported Operating Systems:

  • Linux
  • OS X
  • Windows

The project borrows ideas from the many web frameworks that the authors have worked with over the years, as well as bringing some new ideas of its own. We aim to bring a developer-friendly experience to Zig to make web development accessible and enjoyable.

If you are looking for a Zig web framework comparable to Rails , Django , or Phoenix then you have come to the right place.

Visit our YouTube Channel to watch our screencasts.

Philosophy

  • Jetzig will always be free to use, modify, and distribute in any context. The MIT License allows users to freely use this software however they choose.
  • Jetzig does not ask for funding. Any donations should go to the Zig Software Foundation or another good cause of your choosing.
  • We will never ship with a dependency that is not pure Zig. Users can choose to leverage Zig's powerful build system to integrate C dependencies, but the framework itself will always be 100% Zig.
  • Developer experience is the top priority. Features should always be easy to understand and use. The framework provides tooling to help developers create and manage projects, debug their applications, and integrate framework components. A new project should require zero configuration to get up and running, with sensible defaults that can be customized as needed.
  • As members of the open source community, we advocate promotion of other open source projects. See Alternatives for other tools that may benefit you, and contact us if your web-related project is not listed here, we will be happy to include it.

Roadmap

The Jetzig roadmap is always growing. Check back here to see updates and feel free to contact us if you want to suggest an addition to the roadmap.

Completed

  • File system-based routing
  • HTML and JSON responses
  • JSON-compatible response data builder
  • HTML templating
  • Per-request arena allocator
  • Sessions
  • Cookies
  • Error handling
  • Static content from /public director.
  • Request/response headers
  • Stack trace output on error
  • Build-time static content rendering
  • Param/JSON payload parsing/abstracting
  • Static content parameter definitions
  • Middleware interface
  • MIME type inference
  • CLI tool with generators/scaffolding
  • Production server readiness (daemonization, file logging)
  • htmx middleware
  • General purpose cache
  • Email delivery
  • Background jobs
  • Custom (non-RESTful) routing
  • Database integration

Pending

  • Environment configurations (development, staging, production, etc.)
  • Development mode debug page
  • Tailwind middleware
  • HTTP keep-alive
  • Websockets
  • Email receipt (via AWS SES, Sendgrid, etc.)

Alternatives

The below list is a set of alternative or related projects. Please contact us if you would like your project to be listed here.

  • Zap : blazingly fast backends in zig
  • http.zig : An HTTP/1.1 server for Zig.
  • tokamak : Server-side framework for Zig
  • zig-router : Straightforward HTTP-like request routing.
  • zig-webui : Allows you to use any web browser as a GUI, with your preferred language in the backend and HTML5 in the frontend.
  • ZTS : Zig Templates made Simple