Installation¶
Add to your Zig project¶
Mamba requires Zig 0.15.2+.
1. Fetch the dependency¶
This adds mamba to your build.zig.zon.
2. Wire into build.zig¶
const mamba_dep = b.dependency("mamba", .{
.target = target,
.optimize = optimize,
});
// Add to your executable's imports:
const exe = b.addExecutable(.{
.name = "myapp",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "mamba", .module = mamba_dep.module("mamba") },
},
}),
});
3. Import and use¶
Pin to a release¶
To pin to a specific version instead of main: