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

Commit

Permalink
feat: Initial MVP of RocksDbStorage.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantell committed Sep 6, 2023
1 parent 5bb254b commit 04fbf25
Show file tree
Hide file tree
Showing 8 changed files with 378 additions and 33 deletions.
179 changes: 178 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion rust/noosphere-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ homepage = "https://github.com/subconsciousnetwork/noosphere"
readme = "README.md"

[features]
default = []
test_kubo = []
experimental-rocksdb = ["noosphere/experimental-rocksdb"]
experimental-rocksdb-mt = ["noosphere/experimental-rocksdb-mt"]

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

Expand Down Expand Up @@ -66,4 +69,4 @@ libipld-core = { workspace = true }
libipld-cbor = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { workspace = true }
wasm-bindgen = { workspace = true }
6 changes: 6 additions & 0 deletions rust/noosphere-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ wasm-bindgen-test = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
sled = "~0.34"
tokio = { workspace = true, features = ["full"] }
rocksdb = { version = "0.21.0", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { workspace = true, features = ["sync", "macros"] }
Expand All @@ -53,3 +54,8 @@ features = [
"Window",
"DedicatedWorkerGlobalScope",
]

[features]
default = []
rocksdb = ["dep:rocksdb"]
rocksdb-mt = ["dep:rocksdb"]
6 changes: 6 additions & 0 deletions rust/noosphere-storage/src/implementation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ mod sled;
#[cfg(not(target_arch = "wasm32"))]
pub use self::sled::*;

#[cfg(all(not(target_arch = "wasm32"), feature = "rocksdb"))]
mod rocks_db;

#[cfg(all(not(target_arch = "wasm32"), feature = "rocksdb"))]
pub use rocks_db::*;

#[cfg(target_arch = "wasm32")]
mod indexed_db;

Expand Down
Loading

0 comments on commit 04fbf25

Please sign in to comment.