Skip to content
@zig-utils

Zig Utilities & More

Commonly-needed, performant & dependency-free Zig utilities.

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

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.

🛡️ Security

Project What it is
zig-waf An 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-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.

🔤 Text & Data

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

🧰 Building Applications

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.

🔬 Testing, Benchmarking & Release

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.

Getting Started

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.

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

Pinned Loading

  1. zig-regex zig-regex Public

    A modern, performant regular expression library for Zig.

    Zig 30 7

  2. zig-js zig-js Public

    A JavaScript engine in pure Zig.

    Zig 23

  3. zig-test-framework zig-test-framework Public

    A modern, feature-rich testing framework for Zig inspired by Jest, Vitest, and Bun's test runner.

    Zig 7

  4. zig-config zig-config Public

    A zero-dependency, smart configuration loader for Zig.

    Zig 6

  5. zig-tls zig-tls Public

    Pure Zig TLS 1.3 & 1.2 implementation and more.

    Zig 3 1

  6. zig-error-handling zig-error-handling Public

    A type-safe error handling library for Zig inspired by Rust's Result<T, E> and TypeScript's neverthrow.

    Zig 3

Repositories

Showing 10 of 18 repositories

Top languages

Loading…

Most used topics

Loading…