-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add impls for the Defmt logging crate #1632
base: main
Are you sure you want to change the base?
Add impls for the Defmt logging crate #1632
Conversation
BenFordTytherington
commented
Nov 26, 2024
- Add impls for the main structs where it is obvious how to do so
- Gate this behind a new cargo feature called "defmt"
77a7629
to
fa9b500
Compare
- Add impls for the main structs where it is obvious how to do so - Gate this behind a new cargo feature called "defmt"
fa9b500
to
fd9d0dd
Compare
I am not excited about adding these. Unfortunately coherence is a bit of a challenge especially in cases like these where (a) neither crate is clearly more "high-level" than the other and (b) neither crate has a stable (1.0+) API. At the very least, I think we'd want this to be a |
From Defmts perspective, implementing the trait here is a better solution due to being able to access all the private fields. Additionally, defmt 1.0 is planned to be released early next year, with hopefully no breaking changes compared to the current version. |
Well, if that's the case I'm going to want to hold off until defmt 1 has been released. |
defmt-1.0 is almost here! We're publishing 1.0-rc1 very shortly. But, we're also going to publish a 0.3.100 which does the semver-trick to re-export defmt-1.0 as-is. So any crate using defmt-0.3 will get a free upgrade to defmt-1.0 with no changes required. |