7 ms·
Does anyone know if Servo has any unsafe Rust code?
by mythmon_ 10y ago
Does anyone know if Servo has any unsafe Rust code?
- panic 10y agoYes, quite a bit of it: https://github.com/servo/servo/search?l=rust&q=unsafe https://github.com/servo/servo/search?l=rust&q=unsafe
- majewsky 10y agoAny reasonably large program will have at least some amounts of unsafe code. And that's not a big deal. The point of Rust is to very clearly isolate the unsafe parts, so that you only need to audit 1% or less for memory safety.
- kbenson 10y agoIf it uses any external libraries (for example, for image handling) then I believe it does by definition, since the API wrapper you end up writing ends up being a small shim that wraps the actual library call in unsafe (because object code is unsafe, as the term in used in Rust).