diff --git a/veilid-core/src/network_manager/mod.rs b/veilid-core/src/network_manager/mod.rs index 3c0ee077..9c0f951a 100644 --- a/veilid-core/src/network_manager/mod.rs +++ b/veilid-core/src/network_manager/mod.rs @@ -38,7 +38,7 @@ use hashlink::LruCache; #[cfg(not(target_arch = "wasm32"))] use native::*; #[cfg(not(target_arch = "wasm32"))] -pub use native::{LOCAL_NETWORK_CAPABILITIES, MAX_CAPABILITIES, PUBLIC_INTERNET_CAPABILITIES}; +pub use native::{MAX_CAPABILITIES, PUBLIC_INTERNET_CAPABILITIES}; use routing_table::*; use rpc_processor::*; use storage_manager::*; diff --git a/veilid-flutter/rust/src/dart_isolate_wrapper.rs b/veilid-flutter/rust/src/dart_isolate_wrapper.rs index 2c0bb371..35b8bbe2 100644 --- a/veilid-flutter/rust/src/dart_isolate_wrapper.rs +++ b/veilid-flutter/rust/src/dart_isolate_wrapper.rs @@ -1,5 +1,5 @@ use crate::tools::*; -pub use allo_isolate::ffi::DartCObject; + pub use allo_isolate::IntoDart; use allo_isolate::Isolate; use core::fmt::Debug; diff --git a/veilid-flutter/rust/src/tools.rs b/veilid-flutter/rust/src/tools.rs index fe17f75c..b92fb6e9 100644 --- a/veilid-flutter/rust/src/tools.rs +++ b/veilid-flutter/rust/src/tools.rs @@ -16,15 +16,15 @@ cfg_if! { pub use async_std::future::timeout; } else if #[cfg(feature="rt-tokio")] { pub use tokio::task::JoinHandle; - pub use tokio::net::TcpStream; + //pub use tokio::time::error::Elapsed as TimeoutError; - pub use tokio::sync::Mutex as AsyncMutex; + pub fn spawn + Send + 'static, T: Send + 'static>(f: F) -> JoinHandle { GLOBAL_RUNTIME.spawn(f) } - pub use tokio::time::sleep; - pub use tokio::time::timeout; + + lazy_static::lazy_static! { static ref GLOBAL_RUNTIME: tokio::runtime::Runtime = tokio::runtime::Runtime::new().unwrap(); } diff --git a/veilid-server/src/tools.rs b/veilid-server/src/tools.rs index c36322e1..a1ca8116 100644 --- a/veilid-server/src/tools.rs +++ b/veilid-server/src/tools.rs @@ -1,5 +1,5 @@ pub use cfg_if::*; -pub use color_eyre::eyre::{bail, ensure, eyre, Result as EyreResult, WrapErr}; +pub use color_eyre::eyre::{bail, eyre, Result as EyreResult, WrapErr}; pub use core::future::Future; pub use parking_lot::*; pub use tracing::*;