Cargo Features

rocksdb = { version = "0.21.0", default-features = false, features = ["jemalloc", "io-uring", "valgrind", "snappy", "lz4", "zstd", "zlib", "bzip2", "rtti", "multi-threaded-cf", "serde1"] }
default = bzip2, lz4, snappy, zlib, zstd

These default features are set whenever rocksdb is added without default-features = false somewhere in the dependency tree.


Enables jemalloc of librocksdb-sys ^0.11.0


Enables io-uring of librocksdb-sys ^0.11.0

snappy default

Enables snappy of librocksdb-sys ^0.11.0

lz4 default

Enables lz4 of librocksdb-sys ^0.11.0

zstd default

Enables zstd of librocksdb-sys ^0.11.0

zlib default

Enables zlib of librocksdb-sys ^0.11.0

bzip2 default

Enables bzip2 of librocksdb-sys ^0.11.0


Enables rtti of librocksdb-sys ^0.11.0


Affects column_family::ColumnFamilyRef, db::DB, optimistic_transaction_db::OptimisticTransactionDB

serde1 = serde

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

serde serde1?

With derive and default (std)