From c078be8924b6da56fefa7f8070eb3207938467a0 Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Fri, 24 May 2024 02:28:04 +0300 Subject: [PATCH] nextgraph preview.6 --- nextgraph/Cargo.toml | 4 ++-- nextgraph/src/local_broker.rs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nextgraph/Cargo.toml b/nextgraph/Cargo.toml index b13bb6a..a160823 100644 --- a/nextgraph/Cargo.toml +++ b/nextgraph/Cargo.toml @@ -2,7 +2,7 @@ name = "nextgraph" description = "NextGraph client library. Nextgraph is a decentralized, secure and local-first web 3.0 ecosystem based on Semantic Web and CRDTs" categories = ["asynchronous","text-editors","web-programming","development-tools","database-implementations"] -version = "0.1.0-preview.5" +version = "0.1.0-preview.6" edition.workspace = true license.workspace = true authors.workspace = true @@ -32,7 +32,7 @@ ng-wallet = { path = "../ng-wallet", version = "0.1.0-preview.5" } 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] +[target.'cfg(all(not(target_family = "wasm"),not(docsrs)))'.dependencies] ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0-preview.6" } [[example]] diff --git a/nextgraph/src/local_broker.rs b/nextgraph/src/local_broker.rs index b6c488e..79725c0 100644 --- a/nextgraph/src/local_broker.rs +++ b/nextgraph/src/local_broker.rs @@ -42,11 +42,11 @@ use ng_verifier::verifier::Verifier; use ng_wallet::emojis::encode_pazzle; use ng_wallet::{create_wallet_first_step_v0, create_wallet_second_step_v0, types::*}; -#[cfg(not(target_arch = "wasm32"))] +#[cfg(not(target_family = "wasm"))] use ng_client_ws::remote_ws::ConnectionWebSocket; -#[cfg(target_arch = "wasm32")] +#[cfg(target_family = "wasm")] use ng_client_ws::remote_ws_wasm::ConnectionWebSocket; -#[cfg(not(any(target_family = "wasm")))] +#[cfg(not(any(target_family = "wasm",docsrs)))] use ng_storage_rocksdb::block_storage::RocksDbBlockStorage; #[doc(hidden)] @@ -911,7 +911,7 @@ impl LocalBroker { Arc::new(std::sync::RwLock::new(HashMapBlockStorage::new())) as Arc> } else { - #[cfg(all(not(target_family = "wasm")))] + #[cfg(all(not(target_family = "wasm"),not(docsrs)))] { let key_material = wallet .client() @@ -932,7 +932,7 @@ impl LocalBroker { )?)) as Arc> } - #[cfg(target_family = "wasm")] + #[cfg(any(target_family = "wasm",docsrs))] { Arc::new(std::sync::RwLock::new(HashMapBlockStorage::new())) as Arc>