RocksDB.jl

Julia bindings for RocksDB, Facebook's embedded persistent key-value store, built on a from-scratch BinaryBuilder.jl recipe with support for all five compression backends RocksDB offers (Snappy, zlib, bzip2, LZ4, Zstd) plus io_uring on Linux – see bindings/README.md.

The package is organized in three tiers, so you can pick the level of control you need:

  1. RocksDB.LibRocksDB – near-direct, auto-generated ccall wrappers over RocksDB's entire C API. Anything the C API can do, this can do; it's the escape hatch, not meant for everyday use – see Tier 1 Escape Hatch for how and when to drop down to it.
  2. Tier 2 (opendb, DB, put!/get/ delete!, WriteBatch, DBIterator, Snapshot, BackupEngine, compact!, ...) – idiomatic Julia wrappers with sensible defaults, for everyday use.
  3. Tier 3 (RocksDBDict, ColumnFamilies, RocksDBSnapshotView) – an AbstractDict-like facade with compression/cache/environment knobs surfaced directly in the constructor, atomic batch writes, column families as dict-like sub-namespaces, and read-only point-in-time snapshot views.

The tiers aren't an either/or choice – see Mixing Tier 2 and Tier 3 for how to combine Tier 2 and Tier 3, and Tier 1 Escape Hatch for Tier 1 and Tier 2.

Where to start

New to the package? Start with the tutorials, in order:

  1. Getting Started
  2. Compression
  3. Iteration and Range Scans
  4. Write Batches
  5. Column Families
  6. TTL Databases
  7. Compaction
  8. Snapshots
  9. Backups
  10. Tier 1 Escape Hatch
  11. Mixing Tier 2 and Tier 3

Already know what you're looking for? Jump to the Tier 2 API Reference or Tier 3 API Reference.

Development

See CLAUDE.md for the project's internal architecture notes (version pins, why things are built the way they are, what's deferred).

License

MIT. See LICENSE.