ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
Dr_Who has joined #rust-embedded
Dr_Who has quit [Remote host closed the connection]
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #rust-embedded
<re_irc> <@burrbull:matrix.org> https://github.com/rust-lang/rust/issues/99012
corecode has quit [Ping timeout: 252 seconds]
corecode has joined #rust-embedded
richardeoin has quit [Ping timeout: 252 seconds]
richardeoin has joined #rust-embedded
<re_irc> <@boiethios:matrix.org> I write a lib to be consumed by controllers. Can I implement "Debug" for all my types without the final binary growing in size? If the debug implementations aren't used, are they stripped out from the binary?
<re_irc> <@boiethios:matrix.org> I assume so, but I'd rather be 100% sure
<re_irc> <@therealprof:matrix.org> The "Debug" implementation will only materialise in binary code if it's actually used.
<re_irc> <@therealprof:matrix.org> The "danger" about doing this is that people might accidentally use it and wonder why their application gets bloated. If you don't implement that, they'll get an error instead.
<re_irc> <@boiethios:matrix.org> Maybe I can put that behind a feature?
<re_irc> <@therealprof:matrix.org> If you think a type makes sense to be formatted outside of debugging output I'd recommend to implement "Display" instead.
<re_irc> <@boiethios:matrix.org> * It's worth it putting
<re_irc> <@boiethios:matrix.org> I only use their display during debugging
<re_irc> <@therealprof:matrix.org> Not sure it's possible to feature gate auto-impls, I don't think it is.
<re_irc> <@boiethios:matrix.org> It is
<re_irc> <@boiethios:matrix.org> * is, IIRC
<re_irc> <@boiethios:matrix.org> with "cfg_attr"
<re_irc> <@therealprof:matrix.org> Hm, I don't think it is worth the mental overhead.
<re_irc> <@boiethios:matrix.org> I just verified, this works: "#[cfg_attr(feature = "debug", derive(Debug))]"
<re_irc> <@therealprof:matrix.org> TIL 😉
<re_irc> <@therealprof:matrix.org> Manual implementation would provide the benefit of controlling how the formatting is done rather than the built-in formatters which can be quite extensive to provide nice output under any circumstance...
<re_irc> <@boiethios:matrix.org> I do write a couple of implementation by hand, but the automatic one is good enough for most of the types.
<re_irc> <@boiethios:matrix.org> * implementations
<re_irc> <@therealprof:matrix.org> I'd say go with the derives then.
<re_irc> <@therealprof:matrix.org> Can always put a warning in the docs saying: If you debug print this type, your binary size might explode.
<re_irc> <@boiethios:matrix.org> Well, they'll see that soon enough when the bin cannot fit into the flash
<re_irc> <@therealprof:matrix.org> Hehe...
Dr_Who has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
emerent has quit [Ping timeout: 252 seconds]
emerent has joined #rust-embedded
Dr_Who has quit [Quit: ZZZzzz…]
<re_irc> <@thejpster:matrix.org> Any thoughts on https://github.com/rust-embedded-community/embedded-sdmmc-rs/issues/79 ?
<re_irc> <@ragarnoy:matrix.org> hey, anyone skilled using embassy nrf?
<re_irc> <@peter9477:matrix.org> : https://matrix.to/#/#embassy-rs:matrix.org ?
<re_irc> <@ragarnoy:matrix.org> thanks!
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
<re_irc> I thought this was a pretty good introduction.