Rust to the rescue

May 15 marks the 10th anniversary of the 1.0 release of the Rust programming language. I’d like to reflect on what is has meant to us at 1Optic so far. It started in 2016 with a small web-scraping project that did not necessarily call for such a powerfull language, but we wanted to see of this new programming language would fit our way of working. We had heard some good things and wanted to see if it was a hype or a real contender for inclusion in our toolbox. Since then however, we have learned that this relatively young language brings as numerous benefits in a lot of our software development activities.

Spend less time ironing out bugs

Rust has a very strong type system and a pedantic compiler. This can initially feel annoying when you are are constantly being pointed at your mistakes by the compiler. The upside however is that when that same compiler says you are ‘allowed’ to run your program, changes are very high that it functions as intended. This aspect has proven invaluable in reducing development time and increasing overall quality.

Remove the pain of dependency management

Managing software dependencies can be a pain and a burden without the right tools. From the outset, Rust has been delivered with a very powerfull package manager and online repository for libraries. We have experienced time and time again that when we’ve found a good library for a certain functionality, we can create 100% repeatable builds of our software without ever thinking about it again.

Bring joy in software deployment

The possibility to create statically linked, batteries-included, single-binary applications, makes deployment of these applications a breeze. Even in the context of containerization, it is so much easier to just take the one binary file and be done with it. No more fiddling with the installation of all the dependencies, which can have various incarnations on the different target platforms.

Bring software to the highest levels of security

Because of the memory safety guarantees that the Rust language brings, more and more crucial libraries are being written in Rust. This now even includes parts of the Linux kernel. So next to the guarantees over the software that we write, we can depend on the powerful and secure libraries that are available. We can provide our customers with software that we know to be secure.

Optimal resource utilization

In the past, with low energy costs and dedicated hardware, software could often be sub-optimal in resource utilization. Now, with rising energy costs and the move to the cloud for a lot of companies (with consumption-based pricing models), the focus on resource utilization is more important than ever. With Rust, we can optimize the resource usage due to its focus on performance and features like zero-cost abstractions.

Increased performance

Since we are in a very data-intensive business, performance requirements are often very high in both throughput and latency. We used to work a lot with Python and this brought us far due to the huge community and powerfull
libraries for all kinds of tasks. With Rust however, we could take it to the next level due to the impressive support for parallel and concurrent processing. This means that we can optimally use the current many-core processors that are available in servers nowadays. We can guarantee our customers maximum throughput and minimal latency with our data pipelines.

Conclusion

Since our first steps with the – then new – Rust language, we have found so many benefits that we now use it for most of our components in the 1Optic product family. We can have a peace-of-mind and provide guarantees on
performance and security that benefits us and our customers. We wish the whole Rust community a happy birthday for the language and are happily programming in the meantime!