spawns_compat/lib.rs
1//! `spawns-compat` provides functions to find async runtimes for spawning task.
2//!
3//! It uses [linkme] to inject these functions to `spawns-core`. In some platforms, this crate may
4//! not be linked to binary finally. So, you may have to speak explicitly about this with `extern
5//! crate spawns_compat`. You could also use it with `spawns-core` through `spawns` which does so
6//! for you. Besides this, in macOS, you may have to put below to your `Cargo.toml`.
7//!
8//! ```toml
9//! [profile.dev]
10//! lto = "thin"
11//! ```
12//!
13//! See for details:
14//! * <https://stackoverflow.com/questions/29403920/whats-the-difference-between-use-and-extern-crate/29404692#29404692>
15//! * <https://github.com/dtolnay/linkme/issues/31>
16//! * <https://github.com/dtolnay/linkme/issues/61>
17
18#[cfg(feature = "smol")]
19mod smol;
20#[cfg(feature = "tokio")]
21mod tokio;
22
23#[cfg(feature = "async-global-executor")]
24mod async_global_executor;