chore: featuer gate rocksdb (#20170)

This commit is contained in:
Matthias Seitz
2025-12-06 19:55:55 +01:00
committed by GitHub
parent 8bd970bad8
commit 3e96557e69
2 changed files with 4 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ rayon.workspace = true
[target.'cfg(unix)'.dependencies]
# rocksdb: jemalloc is recommended production workload
rocksdb = { workspace = true, features = ["jemalloc"] }
rocksdb = { workspace = true, features = ["jemalloc"], optional = true }
[dev-dependencies]
reth-db = { workspace = true, features = ["test-utils"] }
@@ -86,6 +86,7 @@ rand.workspace = true
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
[features]
rocksdb = ["dep:rocksdb"]
test-utils = [
"reth-db/test-utils",
"reth-nippy-jar/test-utils",

View File

@@ -31,9 +31,9 @@ pub use consistent::ConsistentProvider;
// RocksDB currently only supported on Unix platforms
// Windows support is planned for future releases
#[cfg(unix)]
#[cfg(all(unix, feature = "rocksdb"))]
mod rocksdb;
#[cfg(unix)]
#[cfg(all(unix, feature = "rocksdb"))]
pub use rocksdb::{RocksDBBuilder, RocksDBProvider};
/// Helper trait to bound [`NodeTypes`] so that combined with database they satisfy