Batteries for Zig.
Fast, dependency-free libraries and tools — from a JavaScript engine and a WAF down to the small pieces you reach for every day.
Every library here is pure Zig, zero external dependencies unless stated, and MIT licensed. They compose well together but none of them require the others.
| Project | What it is |
|---|---|
| zig-js | A pure-Zig JavaScript engine with a JavaScriptCore-shaped C API. Passes the configured test262 corpus 53,175/53,175 and the ten-profile WebAssembly matrix, with a JIT and no GIL. |
| zig-gc | A precise, tri-color mark-sweep garbage collector, generic over an embedder binding (MMTk-style). Non-moving by default, with opt-in failure-atomic compaction. |
| Project | What it is |
|---|---|
| zig-waf | An embeddable web application firewall and fleet platform targeting Mod安全 3 / Coraza semantics with OWASP CRS 4 compatibility. Ships a reverse proxy, a C connector ABI, and Nginx/Caddy/Envoy/HAProxy integrations. |
| zig-tls | Pure Zig TLS 1.3 and 1.2 — client and server, non-blocking I/O, STARTTLS, PSK resumption and opt-in 0-RTT, with optional AArch64/x86_64 AES-GCM assembly. |
| zig-injection | Allocation-free SQLi and XSS detection, behaviorally compatible with libinjection 4. Idiomatic Zig plus a stable C ABI. |
| Project | What it is |
|---|---|
| zig-regex | A regex engine pairing a linear-time Thompson NFA with a backtracking engine for lookaround, backreferences, and named groups. |
| zig-xml | A small, lenient, allocation-light XML/HTML pull tokenizer with HTML5 character-reference decoding. Built for untrusted markup — no DTDs, no XXE. |
| zig-search-engine | 搜索-engine integrations for Zig services. Declare a collection as a schema; a driver builds the engine-native structure. Typesense first. |
| zig-faker | Realistic fake data for tests, seeds, and prototypes — 20+ categories across 55 locales, with reproducible seeding. |
| Project | What it is |
|---|---|
| zig-cli | Type-safe, compile-time validated CLIs. Define options as a struct and get parsing, routing, help output, and interactive prompts for free. |
| zig-config | A smart configuration loader — local files, home directory, env vars, and defaults, deep-merged into your typed config struct. |
| zig-error-handling | A Result(T, E) type inspired by Rust and neverthrow: chainable map / andThen, pattern matching, and zero runtime overhead. |
| Project | What it is |
|---|---|
| zig-test-framework | Jest/Vitest-style testing for Zig: describe/it, rich matchers, mocks and spies, snapshots, coverage, watch mode, and 5 reporters. |
| zig-benchmarks | A mitata-inspired benchmark harness with high-precision timing, percentile statistics, and beautiful CLI output. |
| zig-bump | One command to bump the version in build.zig.zon — interactive, with optional commit, tag, and push. |
| zig-changelog | Generate changelogs from conventional commits, as a library or a CLI. |
| zig-starter | A production-ready template wiring the above together, so a new library or CLI starts with tests, config, and releases already working. |
Most projects install through Pantry or the Zig package manager:
pantry add zig-regex// build.zig
const regex = b.dependency("regex", .{ .target = target, .optimize = optimize });
exe.root_module.addImport("regex", regex.module("regex"));Check each repository's README for its exact module name and minimum Zig version.
问题 and pull requests are welcome on every repository. Good first steps: pick an open issue, add a test case, or improve documentation. If you are unsure where something belongs, ask in Discord.
- 💬 Discord — questions, design discussion, and release news
- 🐛 GitHub 问题 on the relevant repository — bugs and feature requests
Made with 💙 · MIT licensed