What is the current safety story for library-based stackful coroutines?

Maybe? I think all the std use of TLS should be fine. It's either optimizations, or really identifies the current thread.

Libraries which use TLS to identify a logical flow context (e.g. a logging/tracing context) might however indeed break and would not be compatible with this approach. I guess it would be fair to say that's would be an issue with the coroutine library and not with the TLS usage of those libraries.

May could make all of it's functions unsafe, and then have an internal module that provides safe versions, not meant to be used except through a macro that requires a safety assertion:

// SAFETY: we don't use TLS
#[may::safe]
unsafe mod may {}

// ===>
// mod may {
//     pub use may::_internal_unsafe_dont_use::*;
// }

The program wide safety assertion is still a footgun, but it's better than a note in the docs.

This would be better with custom lints:

#![forbid(may::coroutine_tls_access)]

// SAFETY: we can't use TLS
// because we enabled the `no_tls` lint
#[may::safe]
unsafe mod may {}

Where may::coroutine_tls_access is a lint that warns on any use of LocalKey.