Analysis updated 2026-05-18
Replace raw Zig pointers and standard containers with zust's safe, ownership-checked equivalents.
Run zust's static analyzer in CI to catch memory safety bugs before merging code.
Use zust's language server in an editor to see ownership violations as you type.
Migrate an existing Zig codebase toward safer types using the included transpiler.
| e-jerk/zust | alichraghi/mach-dusk | alichraghi/mach-glfw-vulkan-example | |
|---|---|---|---|
| Stars | 0 | — | — |
| Language | Zig | Zig | Zig |
| Last pushed | — | 2024-02-24 | 2023-08-11 |
| Maintenance | — | Dormant | Dormant |
| Setup difficulty | moderate | hard | moderate |
| Complexity | 4/5 | 4/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Adding zust to a project requires editing build.zig and, for full safety, migrating existing types to zust's safe equivalents.
zust brings Rust's ownership model to the Zig programming language. It is a compile time library, meaning the checks happen while the code is being built rather than while it runs, that aims to catch bugs like double frees, use after free, and having two mutable references to the same data at the same time, all without adding any cost while the program is actually running. The project has two layers. The first is a pure Zig library that encodes ownership rules directly into its type system, so breaking those rules produces a compile error instead of a runtime crash. It includes a Box type for owned heap values that tracks ownership state through its type parameters, a safe linked list built on top of that Box type, and two ways to temporarily borrow a value, either through closures or through explicit borrow and release calls. The README shows several Rust standard library types mapped one to one onto zust equivalents, including Box, Rc, Arc, Weak, Mutex, RwLock and Cell, with matching Rust and Zig code side by side for each. The second layer is a separate static analysis tool that uses the library itself to check general Zig code. It traces where pointers, boxes and borrows come from within a single function, flags places that use raw pointers instead of the safe wrapper types, and can output results in the SARIF format used by many continuous integration systems. It also runs as a language server, providing live diagnostics, code completion, go to definition, hover information and code actions inside an editor. The README also includes a quick start script that adds zust to an existing Zig project in under a minute and a table mapping common unsafe standard library patterns to their zust replacements, along with a separate migration guide document. Project statistics listed in the README claim 462 passing tests across the library, SIMD, fuzz and analyzer test suites, 30 detected bug classes in the analyzer, and SIMD based speedups of up to fifteen times on bulk operations. The full README is longer than what was shown.
A compile-time library that brings Rust-style memory safety checks to the Zig programming language at no runtime cost.
Mainly Zig. The stack also includes Zig, SIMD, LSP.
The README excerpt does not state a license.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.