Skip to content

Commit 3e96557

Browse files
authored
chore: featuer gate rocksdb (#20170)
1 parent 8bd970b commit 3e96557

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/storage/provider/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ rayon.workspace = true
6464

6565
[target.'cfg(unix)'.dependencies]
6666
# rocksdb: jemalloc is recommended production workload
67-
rocksdb = { workspace = true, features = ["jemalloc"] }
67+
rocksdb = { workspace = true, features = ["jemalloc"], optional = true }
6868

6969
[dev-dependencies]
7070
reth-db = { workspace = true, features = ["test-utils"] }
@@ -86,6 +86,7 @@ rand.workspace = true
8686
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
8787

8888
[features]
89+
rocksdb = ["dep:rocksdb"]
8990
test-utils = [
9091
"reth-db/test-utils",
9192
"reth-nippy-jar/test-utils",

crates/storage/provider/src/providers/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pub use consistent::ConsistentProvider;
3131

3232
// RocksDB currently only supported on Unix platforms
3333
// Windows support is planned for future releases
34-
#[cfg(unix)]
34+
#[cfg(all(unix, feature = "rocksdb"))]
3535
mod rocksdb;
36-
#[cfg(unix)]
36+
#[cfg(all(unix, feature = "rocksdb"))]
3737
pub use rocksdb::{RocksDBBuilder, RocksDBProvider};
3838

3939
/// Helper trait to bound [`NodeTypes`] so that combined with database they satisfy

0 commit comments

Comments
 (0)