Rust "unsafe" is not code the compiler doesn't understand
Rust "unsafe" is not code the compiler doesn't understand
Posted Dec 14, 2025 12:10 UTC (Sun) by alx.manpages (subscriber, #145117)In reply to: Rust "unsafe" is not code the compiler doesn't understand by sammythesnake
Parent article: Rust in Android: move fast and fix things (Google Security Blog)
> Writing a non-trivial C program without UB *may* be possible, using MISRA style, intrinsics, compiler extensions etc. but doing so in standard C *and proving there is no UB* is not.
Indeed, standard C is a terrible dialect of C. We're working on improving that, but I strongly recommend using extensions that provide safety that the standard can't provide.
Please don't judge C by one of its worst dialects. Those judgements feel disconnected from reality, when one can write C programs that are safe from many (admittedly, not *yet* all) of the concerns that are often associated with C.
