Skip to main content

web_thread_select/
lib.rs

1/*!
2
3# `web-thread-select`
4
5This crate allows selecting between `web-thread` and `web-thread-shim`
6using a feature flag.
7
8If the target is a `wasm32` architecture and the `web` feature flag is
9passed, we use the Web implementation of `web-thread`; otherwise, we
10transparently substitute in the shim.
11*/
12
13cfg_if::cfg_if! {
14    if #[cfg(all(target_arch = "wasm32", feature = "web"))] {
15        pub use web_thread::*;
16    } else {
17        pub use web_thread_shim::*;
18    }
19}