- cross-posted to:
- lobsters
- cross-posted to:
- lobsters
You must log in or register to comment.
Do also note that by saying that some % of crates use unsafe, it’s not implied that 100% of the code in that crate is marked
unsafe
. It could be as little as one line; it could be a whole lot; it could be well-documented and tested; it might not be. (This is part of what the talk is about.)It’s also rather to be expected that there’s more
unsafe
in embedded. As Steve Klabnik gets into in How to Do Embedded Development with Rust (GOTO 2023), it’s used when you e.g. want to set a certain memory address to a certain value, which in a lot of contexts is nonsense, but in some contexts makes a LED light up.