diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-01-24 23:06:33 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-01-24 23:06:33 +0100 |
| commit | 2bcccb18a6cb8bf836f57c3d86f759b19699def2 (patch) | |
| tree | ef55a10c6d9703677a983b8ca900fb4578a08eb3 /kv | |
| parent | b2e88a8beabf04adc28947cf82996e8692a68b71 (diff) | |
| download | jellything-2bcccb18a6cb8bf836f57c3d86f759b19699def2.tar jellything-2bcccb18a6cb8bf836f57c3d86f759b19699def2.tar.bz2 jellything-2bcccb18a6cb8bf836f57c3d86f759b19699def2.tar.zst | |
cache as object
Diffstat (limited to 'kv')
| -rw-r--r-- | kv/Cargo.toml | 15 | ||||
| -rw-r--r-- | kv/src/lib.rs | 4 |
2 files changed, 16 insertions, 3 deletions
diff --git a/kv/Cargo.toml b/kv/Cargo.toml index ab24e25..91422c7 100644 --- a/kv/Cargo.toml +++ b/kv/Cargo.toml @@ -5,6 +5,15 @@ edition = "2024" [dependencies] anyhow = "1.0.100" -rand = "0.10.0-rc.7" -rocksdb = { version = "0.24.0", features = ["multi-threaded-cf"] } -redb = "3.1.0" +rand = { version = "0.10.0-rc.7", optional = true } +rocksdb = { version = "0.24.0", features = [ + "multi-threaded-cf", +], optional = true } +redb = { version = "3.1.0", optional = true } + +[features] +# default = ["rocksdb", "redb", "memory", "filesystem"] +rocksdb = ["dep:rocksdb"] +redb = ["dep:redb"] +memory = [] +filesystem = ["dep:rand"] diff --git a/kv/src/lib.rs b/kv/src/lib.rs index 0e9b78e..939391c 100644 --- a/kv/src/lib.rs +++ b/kv/src/lib.rs @@ -5,9 +5,13 @@ */ pub mod dummy; +#[cfg(feature = "filesystem")] pub mod filesystem; +#[cfg(feature = "memory")] pub mod memory; +#[cfg(feature = "redb")] pub mod redb; +#[cfg(feature = "rocksdb")] pub mod rocksdb; pub use anyhow; |