use std::future::Future;
#[cfg(any(not(target_arch = "wasm32"), target_os = "wasi"))]
#[track_caller]
pub fn spawn<F: Future<Output = ()> + Send + 'static>(f: F) {
#[cfg(feature = "tracing")]
let f = tracing::Instrument::in_current_span(f);
tokio::task::spawn(f);
}
#[cfg(all(target_arch = "wasm32", not(target_os = "wasi")))]
#[track_caller]
pub fn spawn<F: Future<Output = ()> + 'static>(f: F) {
#[cfg(feature = "tracing")]
let f = tracing::Instrument::in_current_span(f);
wasm_bindgen_futures::spawn_local(f);
}