Skip to content

Repository files navigation

zig-utils

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.

Discord · Zig · Repositories


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.

🚀 Runtime & Engines

ProjectWhat it is
zig-jsA 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-gcA precise, tri-color mark-sweep garbage collector, generic over an embedder binding (MMTk-style). Non-moving by default, with opt-in failure-atomic compaction.

🛡️ Security

ProjectWhat it is
zig-wafAn embeddable web application firewall and fleet platform targeting ModSecurity 3 / Coraza semantics with OWASP CRS 4 compatibility. Ships a reverse proxy, a C connector ABI, and Nginx/Caddy/Envoy/HAProxy integrations.
zig-tlsPure 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-injectionAllocation-free SQLi and XSS detection, behaviorally compatible with libinjection 4. Idiomatic Zig plus a stable C ABI.

🔤 Text & Data

ProjectWhat it is
zig-regexA regex engine pairing a linear-time Thompson NFA with a backtracking engine for lookaround, backreferences, and named groups.
zig-xmlA small, lenient, allocation-light XML/HTML pull tokenizer with HTML5 character-reference decoding. Built for untrusted markup — no DTDs, no XXE.
zig-search-engineSearch-engine integrations for Zig services. Declare a collection as a schema; a driver builds the engine-native structure. Typesense first.
zig-fakerRealistic fake data for tests, seeds, and prototypes — 20+ categories across 55 locales, with reproducible seeding.

🧰 Building Applications

ProjectWhat it is
zig-cliType-safe, compile-time validated CLIs. Define options as a struct and get parsing, routing, help output, and interactive prompts for free.
zig-configA smart configuration loader — local files, home directory, env vars, and defaults, deep-merged into your typed config struct.
zig-error-handlingA Result(T, E) type inspired by Rust and neverthrow: chainable map / andThen, pattern matching, and zero runtime overhead.

🔬 Testing, Benchmarking & Release

ProjectWhat it is
zig-test-frameworkJest/Vitest-style testing for Zig: describe/it, rich matchers, mocks and spies, snapshots, coverage, watch mode, and 5 reporters.
zig-benchmarksA mitata-inspired benchmark harness with high-precision timing, percentile statistics, and beautiful CLI output.
zig-bumpOne command to bump the version in build.zig.zon — interactive, with optional commit, tag, and push.
zig-changelogGenerate changelogs from conventional commits, as a library or a CLI.
zig-starterA production-ready template wiring the above together, so a new library or CLI starts with tests, config, and releases already working.

Getting Started

Most projects install through Pantry or the Zig package manager:

pantry add zig-regex
// build.zigconstregex=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.

Contributing

Issues 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.

Community

  • 💬 Discord — questions, design discussion, and release news
  • 🐛 GitHub Issues on the relevant repository — bugs and feature requests

Made with 💙 · MIT licensed

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages