zig-gc

Installation

Add zig-gc to your build.zig.zon:

zig fetch --save git+https://github.com/zig-utils/zig-gc

Then wire the module up in build.zig:

const gc = b.dependency("gc", .{
    .target = target,
    .optimize = optimize,
});
exe.root_module.addImport("gc", gc.module("gc"));

Requires Zig 0.17.0-dev or newer.

Or through Pantry:

pantry add zig-gc