diff --git a/Cargo.toml b/Cargo.toml index 7e46b15..b7b3295 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,6 @@ rocksdb = ["dep:rocksdb"] [dependencies] parity-scale-codec = { version = "3.0.0", features = ["derive"] } -rocksdb = { optional = true, version = "0.21.0", features = ["multi-threaded-cf"] } serde = { version = "1.0.193", features = ["derive"] } bincode = "1.3.3" log = "0.4.20" @@ -24,6 +23,9 @@ derive_more = { version = "0.99.17", features = ["constructor"] } mp-felt = { git = "https://github.com/keep-starknet-strange/madara.git", rev = "f30acea8af7e28e956e771928130e12bfc084832", package = "mp-felt", features = ["parity-scale-codec", "serde"]} mp-hashers = { git = "https://github.com/keep-starknet-strange/madara.git", rev = "f30acea8af7e28e956e771928130e12bfc084832", package = "mp-hashers" } +# Optionals +rocksdb = { optional = true, version = "0.21.0", features = ["multi-threaded-cf"] } + [dev-dependencies] tempfile = "3.8.0" mp-commitments = { git = "https://github.com/keep-starknet-strange/madara.git", rev = "f30acea8af7e28e956e771928130e12bfc084832", package = "mp-commitments" } diff --git a/src/databases/mod.rs b/src/databases/mod.rs index 27a1f3d..59d8435 100644 --- a/src/databases/mod.rs +++ b/src/databases/mod.rs @@ -1,6 +1,8 @@ #![allow(dead_code)] mod hashmap_db; +#[cfg(feature = "rocksdb")] mod rocks_db; +#[cfg(feature = "rocksdb")] pub use rocks_db::{create_rocks_db, RocksDB, RocksDBBatch, RocksDBConfig};