nym_client_core/
lib.rs

1use std::future::Future;
2
3#[cfg(all(
4    not(target_arch = "wasm32"),
5    feature = "cli",
6    feature = "fs-surb-storage",
7    feature = "fs-credentials-storage",
8    feature = "fs-gateways-storage"
9))]
10pub mod cli_helpers;
11pub mod client;
12pub mod config;
13pub mod error;
14pub mod init;
15
16pub use nym_topology::{
17    HardcodedTopologyProvider, NymRouteProvider, NymTopology, NymTopologyError, TopologyProvider,
18};
19
20#[deprecated(note = "use spawn_future from nym_task crate instead")]
21#[cfg(target_arch = "wasm32")]
22#[track_caller]
23pub fn spawn_future<F>(future: F)
24where
25    F: Future<Output = ()> + 'static,
26{
27    wasm_bindgen_futures::spawn_local(async move {
28        future.await;
29    });
30}
31
32#[deprecated(note = "use spawn_future from nym_task crate instead")]
33#[cfg(not(target_arch = "wasm32"))]
34#[track_caller]
35pub fn spawn_future<F>(future: F)
36where
37    F: Future + Send + 'static,
38    F::Output: Send + 'static,
39{
40    tokio::spawn(future);
41}