If you pay attention to the tech scene and software languages on the market, you probably have come across people talking about Rust. What is all the hype around this language, and why does it exist?
Brief History
Rust was created as a personal project by Graydon Hoare, who worked at Mozilla as a research employee. Eventually Mozilla sponsored the project and even leveraged it for an experimental browser they were building, called Servo. In 2021 the Rust Foundation was launched by five founding companies which include AWS, Huawei, Google, Microsoft, and Mozilla.
Why was Rust built?
Rust’s goal was to create an efficient, performant, and safe system-level programming language. Rust is generally similar to C++ but with one major difference: memory safety. In C++ you are responsible for ensuring memory is properly released. Due to this fact, many C++ applications tend to have memory leaks which become a major security concern. Rust, on the other hand, checks at compile time. The borrow checker validates at compile time to ensure all variables are initiated before use, and your memory usage is safe. This forces you to use proper memory management by default or you cannot even execute your application. If a Rust app compiles, you can be certain that no piece of code is referencing freed memory and that all values are initiated before they are accessed. If your Rust code compiles, it is going to run, and be memory safe.
Rust is efficient, safe, and performant since it runs closer to the metal … But why would I want to learn another language?
Rust is currently trending in a few different areas. One of those areas is in IoT (Internet of Things) and embedded systems. Security is on everyone’s mind as these devices are frequently being attacked. Think of devices in the medical and industrial fields that drive all sorts of very important use cases; the safer these are, the better we all are. Rust provides a great secure and performant platform for this. Rust is also gaining popularity as a back-end language for web applications when the work being done is computationally heavy.
Adoption
With Web Assembly (WASM), Rust is also seeing a high adoption rate. With Rust running in Web Assembly, you can get near-native speed computation at the browser. You can perform things that JavaScript would not be able to handle performance-wise with ease. There is even work to create a system interface for WASM application called WASI . WASI (Web Assembly System Interface) will provide a POSIX (Portable Operating System Interface) which can be leveraged to access things like files, network, clocks, random numbers, etc. in a secure and portable way that will work across any operating system.
Rust is currently in use by companies like Dropbox, Figma, Cloudflare, Meta, Discord, Amazon, Microsoft, Mozilla, and many more.
Community
Rust has matured over the years and has a very active community which create production-ready packages called crates. (“Crates” are similar to “packages” in npm.) With over 100 thousand Crates, many active forums, Discord Channels, etc., it is a very active community and will continue to grow.
Summary
Rust has already made its way into production in many different areas. As the community grows and more use cases come out, Rust may become the next language your business needs to leverage to meet your business goals. Just like every other language out there, it is a tool that you should be aware of and determine when it should make its way into your toolbox. If you need a very performant and secure development language, Rust should definitely be on the top of the list. If you are building IoT devices or industrial applications, you should take a very serious look at this language.
Do these use cases sound like they would benefit your company? Please reach out if you are considering Rust for your next project!
About the Author
Curtis Gibeaut Jr. is a Solution Architect with SafeNet Consulting. Curtis has over 20 years of software development experience across many different platforms, languages, and industries. He considers himself a polyglot developer and is continually looking at new platforms to see how they fit within his tool belt to build the best solutions for the businesses he supports.