From b5da50f5ae526f553ccfc74f4f411c15a926e5de Mon Sep 17 00:00:00 2001 From: Kezhu Wang Date: Mon, 6 May 2024 20:00:29 +0800 Subject: [PATCH] Document linker solution for macOS in spawns crate also --- spawns/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spawns/src/lib.rs b/spawns/src/lib.rs index e866b71..7352e3e 100644 --- a/spawns/src/lib.rs +++ b/spawns/src/lib.rs @@ -50,6 +50,15 @@ //! Noted that, all those compatibility features, injections should only active on tests and //! binaries. Otherwise, they will be propagated to dependents with unnecessary dependencies. //! +//! For macOS users, you may have to put below to your `Cargo.toml` for above to function. +//! +//! ```toml +//! [profile.dev] +//! lto = "thin" +//! ``` +//! +//! See for sure. +//! //! ## Dealing with multiple global executors //! Global executor cloud spawn task with no help from thread context. But this exposes us an //! dilemma to us, which one to use if there are multiple global executors present ? By default,