Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jiacai2050/zig-rocksdb
RocksDB binding for Zig
https://github.com/jiacai2050/zig-rocksdb
rocksdb rocksdb-zig zig zig-lib zig-library zig-package
Last synced: 30 days ago
JSON representation
RocksDB binding for Zig
- Host: GitHub
- URL: https://github.com/jiacai2050/zig-rocksdb
- Owner: jiacai2050
- License: mit
- Created: 2024-04-27T03:26:42.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-27T06:53:46.000Z (about 2 months ago)
- Last Synced: 2024-10-27T07:37:52.175Z (about 2 months ago)
- Topics: rocksdb, rocksdb-zig, zig, zig-lib, zig-library, zig-package
- Language: Zig
- Homepage:
- Size: 36.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - jiacai2050/zig-rocksdb
README
#+TITLE: Zig-rocksdb
#+DATE: 2024-04-27T11:27:04+0800
#+LASTMOD: 2024-10-27T14:34:21+0800
#+AUTHOR: Jiacai Liu[[https://img.shields.io/badge/zig%20version-0.13.0-blue.svg]]
[[https://github.com/jiacai2050/zig-rocksdb/actions/workflows/CI.yml][https://github.com/jiacai2050/zig-rocksdb/actions/workflows/CI.yml/badge.svg]][[https://github.com/facebook/rocksdb/][RocksDB]] binding for Zig.
* Usage
See [[file:examples/basic.zig]], [[file:examples/cf.zig]] for details.
* Installation
#+begin_src bash
zig fetch --save=rocksdb https://github.com/jiacai2050/zig-rocksdb/archive/${COMMIT}.tar.gz
#+end_srcReplace ~${COMMIT}~ with a real one, then in your =build.zig=, import the module like this:
#+begin_src zig
const dep_rocksdb = b.dependency("rocksdb", .{});
exe.root_module.addImport("rocksdb", dep_rocksdb.module("rocksdb"));
exe.linkLibC();
#+end_srcThis library will link to a vendored [[https://github.com/facebook/rocksdb/releases/tag/v9.0.0][librocksdb(v9.0.0)]] by default, you can disable it and link to system-wide with this
#+begin_src zig
const dep_rocksdb = b.dependency("rocksdb", .{ .link_vendor = false });
exe.linkSystemLibrary("rocksdb");
exe.linkLibC();
#+end_src
* Acknowledge
Thanks to [[https://github.com/rust-rocksdb/rust-rocksdb][rust-rocksdb]], I benefit a lot from it when build this building library.* License
[[file:LICENSE][MIT]]