4 ms·
For what it's worth, I've written two fairly large pieces of code in Rust: Skylight and much of Cargo. In both cases, the amount of unsafe code was very small (
by wycats 12y ago
For what it's worth, I've written two fairly large pieces of code in Rust: Skylight and much of Cargo. In both cases, the amount of unsafe code was very small (tiny) and restricted to FFI boundaries, which are "unsafe" even in high level languages like Ruby.
Servo has been under active development for far longer, and sometimes used unsafe code to work around historical issues that no longer require unsafe code. I find the idea of an idiomatic codebase (written today), that is 10% unsafe code (outside of FFI boundaries) to be difficult to imagine.