You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe a bit outside of how this crate was intended to be used but I think it would be nice if it supported no_std.
thread_local is not available in no_std. One way to deal with that would be to make indentation optional.
println! and Format are also not available in no_std. A popular way of dealing with this is to use defmt, which effectively reimplements println! and Format in a way that is appropriate for no_std. The {{:depth$}} syntax is not supported by defmt. The inclusion of this format specifier would need to be optional.
Here is WIP https://github.com/tommy-gilligan/trace
I've hardcoded no_std enabled in WIP but I consider that a nonstarter for opening a PR here. The next thing to do is to incorporate some kind of condition for toggling no_std support. I think that making thread_local and the unsupported format specifier optional across the crate could be accomplished by a feature flag.
Love to know your thoughts
The text was updated successfully, but these errors were encountered:
Maybe a bit outside of how this crate was intended to be used but I think it would be nice if it supported
no_std
.thread_local
is not available inno_std
. One way to deal with that would be to make indentation optional.println!
andFormat
are also not available inno_std
. A popular way of dealing with this is to usedefmt
, which effectively reimplementsprintln!
andFormat
in a way that is appropriate forno_std
. The{{:depth$}}
syntax is not supported bydefmt
. The inclusion of this format specifier would need to be optional.Here is WIP https://github.com/tommy-gilligan/trace
I've hardcoded no_std enabled in WIP but I consider that a nonstarter for opening a PR here. The next thing to do is to incorporate some kind of condition for toggling
no_std
support. I think that makingthread_local
and the unsupported format specifier optional across the crate could be accomplished by a feature flag.Love to know your thoughts
The text was updated successfully, but these errors were encountered: