rust-embedded / embedded-hal

A Hardware Abstraction Layer (HAL) for embedded systems
Apache License 2.0
1.95k stars 197 forks source link

hal: add optional defmt support. #450

Closed Dirbaio closed 1 year ago

burrbull commented 1 year ago

Defmt is known by its unstability. Is it good idea to depends on it?

ryankurte commented 1 year ago

Defmt is known by its unstability. Is it good idea to depends on it?

fair point, i think it is still useful to have / we'll just have to keep it up to date

eldruin commented 1 year ago

How about naming the feature defmt-0-3 to make the stability status of the defmt dependency clear as well as to potentially support other versions like in nb? It should be noted that this would be the only < 1.0 dependency embedded-hal-bus would have once embedded-hal 1.0 is out.

jannic commented 1 year ago

Related issue: https://github.com/rust-embedded/embedded-hal/issues/460

Making the enums (optionally) derive defmt::Format would be useful for crates using those enums in their structs. (e.g. https://github.com/rp-rs/rp-hal/pull/654#discussion_r1271396851). But I agree we have to be cautious regarding the stability of defmt.

Dirbaio commented 1 year ago