test-log
test-log copied to clipboard
Support `no_std`
I'm writing a library that needs to be tested inside no_std
environments.
Since tracing
, and tracing-subscriber
do not inherently require std
, it would be convenient to be able to use this crate to do so.
I've made some trivial changes, like importing alloc::{string::String, vec::Vec}
, but the more important change is that I've switched std::env::var_os
with core::option_env
, which resolves an optional environment variable at compile time. I'm fine feature gating the std::env::var_os
call behind an std
feature if that is more acceptable for you.
Some things to consider:
- You may want to enable
std_instead_of_alloc
to identify types up front that can be easily used withoutstd
- You may want an
std
flag to enable more features available viastd
that are not required for the base crate to work.
Thanks for all your work; I really enjoy this crate!
—Tait