DizeDB is a Zig SDK for Dicedb, providing a fast, type-safe, and idiomatic interface for interacting with Dicedb from Zig projects.
- Native Zig API for Dicedb
- Type-safe protocol buffer wire support
- Easy integration with Zig build system
- Example usage included
Fetch the library using Zig's package manager:
zig fetch --save git+https://github.com/patrickowor/DizeDB.git#mainAdd the following to your build.zig to include DizeDB as a dependency:
const diceDb = b.dependency("dizeDB", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("dizeDB", diceDb.module("dizeDB"));Example:
const exe = b.addExecutable(.{
.name = "your_app",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
const diceDb = b.dependency("dizeDB", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("dizeDB", diceDb.module("dizeDB"));In your Zig source file:
const dizeDB = @import("dizeDB");
// ... use dizeDB APIzig build runSee examples/src/main.zig for a working example.
This project is licensed under the terms of the LICENSE file.