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;