Skip to content
This repository was archived by the owner on Sep 21, 2024. It is now read-only.

Commit ecd9d2b

Browse files
committed
feat: Initial MVP of RocksDbStorage.
1 parent 5bb254b commit ecd9d2b

File tree

8 files changed

+374
-31
lines changed

8 files changed

+374
-31
lines changed

Cargo.lock

+178-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/noosphere-cli/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ homepage = "https://github.com/subconsciousnetwork/noosphere"
1717
readme = "README.md"
1818

1919
[features]
20+
default = []
2021
test_kubo = []
22+
experimental-rocksdb = ["noosphere/experimental-rocksdb"]
23+
experimental-rocksdb-mt = ["noosphere/experimental-rocksdb-mt"]
2124

2225
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
2326

@@ -66,4 +69,4 @@ libipld-core = { workspace = true }
6669
libipld-cbor = { workspace = true }
6770

6871
[target.'cfg(target_arch = "wasm32")'.dependencies]
69-
wasm-bindgen = { workspace = true }
72+
wasm-bindgen = { workspace = true }

rust/noosphere-storage/Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ wasm-bindgen-test = { workspace = true }
4040
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
4141
sled = "~0.34"
4242
tokio = { workspace = true, features = ["full"] }
43+
rocksdb = { version = "0.21.0", optional = true }
4344

4445
[target.'cfg(target_arch = "wasm32")'.dependencies]
4546
tokio = { workspace = true, features = ["sync", "macros"] }
@@ -53,3 +54,8 @@ features = [
5354
"Window",
5455
"DedicatedWorkerGlobalScope",
5556
]
57+
58+
[features]
59+
default = []
60+
rocksdb = ["dep:rocksdb"]
61+
rocksdb-mt = ["dep:rocksdb"]

rust/noosphere-storage/src/implementation/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ mod sled;
1010
#[cfg(not(target_arch = "wasm32"))]
1111
pub use self::sled::*;
1212

13+
#[cfg(all(not(target_arch = "wasm32"), feature = "rocksdb"))]
14+
mod rocks_db;
15+
16+
#[cfg(all(not(target_arch = "wasm32"), feature = "rocksdb"))]
17+
pub use rocks_db::*;
18+
1319
#[cfg(target_arch = "wasm32")]
1420
mod indexed_db;
1521

0 commit comments

Comments
 (0)