3 ms·
> I assume that those 1.5 "million lines" do not contain any unsafe features Rust allows for. Am I correct here? Because as Rust grows it is easier to model mo
by Gwypaas 4y ago
> I assume that those 1.5 "million lines" do not contain any unsafe features Rust allows for. Am I correct here?
Because as Rust grows it is easier to model more behavior and less unsafe is needed. They mention this in the article.
> There are exactly two uses of unsafe in the UWB code: one to materialize a reference to a Rust object stored inside a Java object, and another for the teardown of the same. Unsafe was actively helpful in this situation because the extra attention on this code allowed us to discover a possible race condition and guard against it.
> In general, use of unsafe in Android’s Rust appears to be working as intended. It’s used rarely, and when it is used, it’s encapsulating behavior that’s easier to reason about and review for safety.
https://security.googleblog.com/2022/12/memory-safe-languages-in-android-13.html https://security.googleblog.com/2022/12/memory-safe-language...