diff --git a/dubp-wot/Cargo.toml b/dubp-wot/Cargo.toml index 5a060429e0738d0acc9d7045c7dd4052086127fd..0821f2f5fd5a8a59f101ee8073275b8ed8151626 100644 --- a/dubp-wot/Cargo.toml +++ b/dubp-wot/Cargo.toml @@ -14,6 +14,8 @@ path = "src/lib.rs" [dependencies] log = "0.4.8" +once_cell = "1.7" +parking_lot = "0.11" rayon = "1.3.0" serde = { version = "1.0.105", features = ["derive"] } diff --git a/dubp-wot/src/lib.rs b/dubp-wot/src/lib.rs index dbfc71b4b46e4801c83cbe4d777815436691678f..06989dc3a1ffe8dc057ac5a8a457f72cc6babfe5 100644 --- a/dubp-wot/src/lib.rs +++ b/dubp-wot/src/lib.rs @@ -44,6 +44,11 @@ pub mod operations; pub use crate::data::{WebOfTrust, WotId}; +use once_cell::sync::OnceCell; + +/// Main wot instance +pub static MAIN_WOT: OnceCell<parking_lot::RwLock<data::rusty::RustyWebOfTrust>> = OnceCell::new(); + #[cfg(test)] mod tests { use super::*;