Found another snag re: dynamic linking Rust code — N copies of tokio are present, so that's N distinct thread-locals storing the "current tokio context"
...and the binary is calling the library from an executor, but the library doesn't think so.
@fasterthanlime simple: Operating system written in Rust running in hardware designed for Rust with ABI molded to exactly fit Rust and Rust Package Model is fundamental to the stack, all software in Rust and Rust only runs here. :done:
@fasterthanlime I continue to grow ever more convinced that globals are the original programming sin (not nulls). Thread locals are just spicy globals, and they cause all the same problems...
@fasterthanlime You can make a dylib which depends on tokio and then depend on this dylib from all your other dylibs to ensure only a single copy of tokio is present. Make sure to use use foo as _; or something similar to male rustc actually register a dependency on foo. Just having it in your Cargo.toml is not enough.