Hacker News new | ask | show | jobs
by GolDDranks 610 days ago
I’ll propose that ALL Rust projects that do useful work depend on unsafe code.

If one claims otherwise, I say they have no understanding of Rust. But also, if one helds that against Rust's value promise, I, again, say that they have no understanding of Rust.

2 comments

I get the impression they're only counting code outside the standard library, in which case tons of useful programs are fully safe.
It's definitely all of them. Even HashMap uses unsafe.
It’s more fundamental than that: the Rust language does not encode hardware specifics into the language, and so way deep down there, you have to write down bytes to an address that Rust considers arbitrary. Unless you only want to run programs that accept no input and take no output, which is not exactly a useful subset of programs.