upvote
I was specifically thinking about register access. That you can make safe if you provide a way to describe what the hardware needs.

Something like this: https://en.wikibooks.org/wiki/Ada_Programming/Representation...

reply
You cannot make it safe. The data representation part is already mostly covered by packed!, enum and ranged_integers. But that doesn't make register access safe.

Any time you touch hardware, all guarantees Rust makes disappear. And anything you place in mapped io can change when you don't expect it.

reply