From 878f091367851764bf801a49a60acfbbc8b5d3fa Mon Sep 17 00:00:00 2001 From: Tpt Date: Wed, 7 Nov 2018 13:32:46 +0100 Subject: [PATCH] Makes RocksDB dependency optional --- lib/Cargo.toml | 2 +- lib/src/lib.rs | 1 + lib/src/store/mod.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 59f4c773..cc4af126 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -16,7 +16,7 @@ travis-ci = { repository = "Tpt/rudf" } [dependencies] lazy_static = "1" -rocksdb = "0.10" +rocksdb = { version = "0.10", optional = true } url = "1" uuid = { version = "0.7", features = ["v4"] } bzip2 = "0.3" diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 2254161d..80a577ec 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -39,6 +39,7 @@ extern crate language_tags; extern crate num_traits; extern crate ordered_float; extern crate quick_xml; +#[cfg(feature = "rocksdb")] extern crate rocksdb; extern crate rust_decimal; extern crate url; diff --git a/lib/src/store/mod.rs b/lib/src/store/mod.rs index c0de7847..e2222901 100644 --- a/lib/src/store/mod.rs +++ b/lib/src/store/mod.rs @@ -4,8 +4,10 @@ pub(crate) mod encoded; pub mod isomorphism; mod memory; pub(crate) mod numeric_encoder; +#[cfg(feature = "rocksdb")] mod rocksdb; pub use store::memory::MemoryDataset; pub use store::memory::MemoryGraph; +#[cfg(feature = "rocksdb")] pub use store::rocksdb::RocksDbDataset;