diff --git a/nextgraph/Cargo.toml b/nextgraph/Cargo.toml index 6a807b4..9ad8aa7 100644 --- a/nextgraph/Cargo.toml +++ b/nextgraph/Cargo.toml @@ -33,7 +33,7 @@ ng-client-ws = { path = "../ng-client-ws", version = "0.1.0-preview.1" } ng-verifier = { path = "../ng-verifier", version = "0.1.0-preview.5" } [target.'cfg(all(not(target_arch = "wasm32")))'.dependencies] -ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0-preview.5" } +ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0-preview.6" } [[example]] name = "in_memory" diff --git a/ng-broker/Cargo.toml b/ng-broker/Cargo.toml index 13889d9..8682cbb 100644 --- a/ng-broker/Cargo.toml +++ b/ng-broker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ng-broker" -version = "0.1.0-preview.3" +version = "0.1.0-preview.6" description = "Broker library of NextGraph, a decentralized, secure and local-first web 3.0 ecosystem based on Semantic Web and CRDTs" edition.workspace = true license.workspace = true @@ -29,8 +29,8 @@ blake3 = "1.3.1" ng-repo = { path = "../ng-repo", version = "0.1.0-preview.1" } ng-net = { path = "../ng-net", version = "0.1.0-preview.1" } ng-client-ws = { path = "../ng-client-ws", version = "0.1.0-preview.1" } -ng-verifier = { path = "../ng-verifier", version = "0.1.0-preview.3" } -ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0-preview.3" } +ng-verifier = { path = "../ng-verifier", version = "0.1.0-preview.6" } +ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0-preview.6" } [target.'cfg(target_arch = "wasm32")'.dependencies.getrandom] version = "0.2.7" diff --git a/ng-storage-rocksdb/Cargo.toml b/ng-storage-rocksdb/Cargo.toml index 04ab22b..06484bc 100644 --- a/ng-storage-rocksdb/Cargo.toml +++ b/ng-storage-rocksdb/Cargo.toml @@ -10,12 +10,13 @@ homepage.workspace = true keywords = ["crdt","e2ee","local-first","p2p","database"] documentation.workspace = true rust-version.workspace = true +build = "build.rs" [dependencies] serde_bare = "0.5.0" ng-repo = { path = "../ng-repo", version = "0.1.0-preview.1" } -[target.'cfg(not(target_arch = "wasm32"))'.dependencies.ng-rocksdb] +[target.'cfg(all(not(target_arch = "wasm32"),not(docsrs)))'.dependencies.ng-rocksdb] git = "https://git.nextgraph.org/NextGraph/rust-rocksdb.git" branch = "master" features = [ ] diff --git a/ng-storage-rocksdb/build.rs b/ng-storage-rocksdb/build.rs new file mode 100644 index 0000000..02716ec --- /dev/null +++ b/ng-storage-rocksdb/build.rs @@ -0,0 +1,7 @@ +fn main() { + + if std::env::var("DOCS_RS").is_ok() { + println!("cargo:rustc-cfg=docsrs"); + } + +} \ No newline at end of file diff --git a/ng-storage-rocksdb/src/lib.rs b/ng-storage-rocksdb/src/lib.rs index cf018ea..eace706 100644 --- a/ng-storage-rocksdb/src/lib.rs +++ b/ng-storage-rocksdb/src/lib.rs @@ -1,5 +1,5 @@ -#[cfg(not(target_arch = "wasm32"))] +#[cfg(all(not(target_arch = "wasm32"),not(docsrs)))] pub mod block_storage; -#[cfg(not(target_arch = "wasm32"))] +#[cfg(all(not(target_arch = "wasm32"),not(docsrs)))] pub mod kcv_storage; diff --git a/ng-verifier/Cargo.toml b/ng-verifier/Cargo.toml index 78b86e1..3e806fc 100644 --- a/ng-verifier/Cargo.toml +++ b/ng-verifier/Cargo.toml @@ -32,13 +32,13 @@ yrs = "0.18.2" bloomfilter = { version = "1.0.13", features = ["random","serde"] } ng-repo = { path = "../ng-repo", version = "0.1.0-preview.1" } ng-net = { path = "../ng-net", version = "0.1.0-preview.1" } -ng-oxigraph = { path = "../ng-oxigraph", version = "0.4.0-alpha.7-ngpreview5" } +ng-oxigraph = { path = "../ng-oxigraph", version = "0.4.0-alpha.7-ngpreview6" } [target.'cfg(target_arch = "wasm32")'.dependencies] -ng-oxigraph = { path = "../ng-oxigraph", version = "0.4.0-alpha.7-ngpreview5", features = ["js"] } +ng-oxigraph = { path = "../ng-oxigraph", version = "0.4.0-alpha.7-ngpreview6", features = ["js"] } [target.'cfg(all(not(target_arch = "wasm32")))'.dependencies] -ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0-preview.5" } +ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0-preview.6" } getrandom = "0.2.7" [dev-dependencies]