DEV Community

Discussion on: 🦀 Rust Reviewed: Is the hype justified? 🦀

Collapse
 
l0uisc profile image
Louis Cloete

Rust is gaining a lot of traction in security-critical low-level software like browser engines, etc. IMO that's where it shine. You can't write a CSS parser, HTML parser, JS interpreter, etc. in C#. You can do it is C++, in fact most are written in C++ today. However, security bugs are starting to become even more of a problem as the world gets more connected. Which is where Rust come in. You can access all the low-level stuff you can from C++ and get the same predictability and performance, but you get language-level protection against memory errors causing security vulnerabilities.

Collapse
 
somedood profile image
Basti Ortiz

Well, technically, you can still write a parser and an interpreter in C#. It's just that the language may not be the most ideal option.

And, also, Rust isn't exactly bulletproof from all security vulnerabilities. The onus is still on us, the developers, to make sure that nasty bugs (like buffer overflow vulnerabilities) are avoided. But sure enough, Rust does help in avoiding many memory issues and pitfalls.

Thread Thread
 
l0uisc profile image
Louis Cloete

You can write it in C#, sure, but not with the performance and memory footprint required. Browsers are already notorious for their appetite for RAM. That's why it is traditionally done in C++. And it is orders of magnitude easier to avoid memory bugs causing security vulnerabilities in Rust compared to C++.