mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 07:20:35 +00:00

* core: support `no-std` + `alloc` Motivation Users have expressed interest in using `tracing` on no_std platforms with `liballoc`. Solution This branch adds `no_std` support to `tracing-core` by adding a `std` feature flag (on by default) which can be disabled to use `libcore` + `liballoc` instead of `libstd`. When the `std` feature is disabled, `tracing-core` will use `spin::Mutex` rather than `std::sync::Mutex`, and the thread-local scoped dispatcher will be disabled (since it necessitates a defined OS threading model, which may not exist on `no_std` platforms). Refs: #213 Signed-off-by: Eliza Weisman <eliza@buoyant.io>