Re:Exploring System76's New Rust Based Desktop Environment
by jolux on Friday January 14, 2022 @03:00AM
(#29931706)
Do you think Actix Web would be safer if it were written in C++?
[ Parent
| on HN ]
Re:Exploring System76's New Rust Based Desktop Environment
by pjmlp on Friday January 14, 2022 @04:22AM
(#29932310)
Probably not, the point was that being in Rust wasn't either.
Re:Exploring System76's New Rust Based Desktop Environment
by mmstick76 on Friday January 14, 2022 @07:03AM
(#29933451)
But the point is the exact opposite because any use of unsafe is clearly marked as such, and therefore a code audit will instantly find its use and question it. Hence the fallout surrounding it.
Re:Exploring System76's New Rust Based Desktop Environment
by pjmlp on Friday January 14, 2022 @08:32AM
(#29934225)
How do you find unsafe on a binary library?
Also that is besides the point, unsafe only deals with a very specific cause of errors that plague C code bases (and those of languages copy-paste compatible with it).
Rust's unsafe wouldn't have done anything to protect against an hypotetical log4r.
Re:Exploring System76's New Rust Based Desktop Environment
by jolux on Friday January 14, 2022 @10:50AM
(#29935915)
My point is that Actix Web was still safer than it would have been if it were written in C++ (which is Rust’s whole goal as far as safety), and moreover the norms of the Rust community are so strong that most of the unsafe usage has since been removed, since it was unnecessary. Unsafe deals with memory errors, which are consistently the largest class of security vulnerabilities in native codebases. This is uncontroversial at this point. Rust won’t protect you from log4j, but it never claimed to. Java still protects you from mishandling memory, despite all the stupid automatic classloading features we keep discovering in it.