Re:Writing a Linux-compatible kernel in Rust
by bregma on Tuesday October 26, 2021 @08:16AM
(#28999429)
I work with safety-certified systems written in C. The tooling around such things is extensive and mature: static analysis, extensive test runs with runtime analysis instrumentation (test coverage at the MC/DC level, valgrind for memory and concurrency analysis) it's all there and used.
It's true that a lot of projects written in C do the equivalent of using Rust's "unsafe". Then again, a lot of Rust projects use Rust's "unsafe".
Re:Writing a Linux-compatible kernel in Rust
by pjmlp on Tuesday October 26, 2021 @08:47AM
(#28999707)
Welcome to the 11% mentioned on my comment.
JOVIAL and ESPOOL were the first system languages with a notion of unsafe code blocks, both about 10 years older than C.
It is a big difference to have unsafe code jump to our eye and being easily searchable, or having each line of code as a possible source of integer overflows, memory corruption, or UB optimization exploit of the day.
How many people bother to actually use such tooling on their C projects?
Not many, most surveys place that number around 11%.
Just as an exercise, Github offers such tooling for C and C++ projects, try to find how many have CodeQL workflows enabled for pull requests.