top | item 43381833

(no title)

hermanradtke | 11 months ago

> basically written in C

Unsafe Rust still has to conform to many of Rust’s rules. It is meaningfully different than C.

discuss

order

est31|11 months ago

It has also way less tooling available than C to analyze its safety.

vlovich123|11 months ago

The things I’ve seen broadly adopted in the industry (i.e. sanitizers) are equally available in Rust. & Rust’s testing infrastructure is standardized so tests are actually common to see in every library.

nindalf|11 months ago

The number of tools matters less than the quality of the tools. Rust’s inherent guarantees + miri + software verification tools mean that in practice Rust code, even with unsafe, ends up being higher quality.

wyager|11 months ago

Miri is better than any C tool I'm aware of for runtime UB detection.

ajross|11 months ago

Are there examples you're thinking about? The only good ones I can think of are bits about undefined behavior semantics, which frankly are very well covered in modern C code via tools like ubsan, etc...

steveklabnik|11 months ago

They're just fundamentally different languages. There's semantics that exist in all four of these quadrants:

* defined in C, undefined in Rust

* undefined in C, undefined in Rust

* defined in Rust, undefined in C

* defined in Rust, defined in C