RocksDB binding for Zig.
See examples/basic.zig, examples/cf.zig for details.
zig fetch --save=rocksdb https://github.com/jiacai2050/zig-rocksdb/archive/${COMMIT}.tar.gzReplace ${COMMIT} with a real one, then in your build.zig, import the module like this:
const dep_rocksdb = b.dependency("rocksdb", .{});
exe.root_module.addImport("rocksdb", dep_rocksdb.module("rocksdb"));
exe.linkLibC();This library will link to a vendored librocksdb(v9.0.0) by default, you can disable it and link to system-wide with this
const dep_rocksdb = b.dependency("rocksdb", .{ .link_vendor = false });
exe.linkSystemLibrary("rocksdb");
exe.linkLibC();Thanks to rust-rocksdb, I benefit a lot from it when build this building library.