Making a strategic bet on Rust

Mainmatter loves Rust

Rust makes a level of efficiency and performance accessible to a wider audience of engineering teams that was previously out of reach. While C and C++ have allowed building highly efficient systems for decades, they come with so many footguns that only extremely skilled and experienced teams can dare to build anything substantial with them – and even those end up with systems that have plenty of problems. Now, with Rust, everyone can build systems with the same level of efficiency and performance without having to worry about most of said footguns. Building on Rust, systems will not only be just as fast as an equivalent system written in C but also more stable and robust. In addition to ensuring memory safety, Rust's rich type system and concepts like the Option and Result types further increase confidence by encouraging solid error handling through concepts built into the language itself.

Yet, Rust enables all that without sacrificing expressiveness of the language, productivity, and developer experience. Modern language concepts like pattern matching and generics, the integrated package manager and solid development tools, all make working with Rust a breeze.

anchorRust on the Web

So where do we see Rust fitting in for web projects? Around 12 years after the language's creation, the ecosystem is still relatively young, yet mature enough for a variety of use cases already:

  • Native extensions written in Rust (via FFI/NIF mechanisms) can be used to speed up parts of existing systems written in Ruby, Elixir, Node, and many other languages, by orders of magnitude and provide an easy onramp to introducing Rust into a team's tech stack.
  • Isolated subsystems of larger server systems with very specific requirements in terms of performance and robustness are great candidates to build in Rust – whether those are individual services in a microservices architecture or layers in multi-layered systems.
  • Similar to subsystems, downstream systems for e.g. data processing and similar tasks with relatively limited scope but hard requirements regarding efficiency will often benefit hugely from being implemented in Rust.

While all these are relatively isolated use cases with limited scope, we believe that eventually Rust will be a reasonable choice for building complete API servers as well although as of yet that problem space still requires some exploration to develop and establish best practices and architectures. We're excited to bring in our years-long experience building web apps of all kinds and be a part of this exploration – for the benefit of the clients we work with as well as the ecosystem overall. Establishing these patterns and building consensus across the community will eventually drive adoption of Rust on the web even further as it makes Rust more accessible for more teams.

And of course there's also WASM – while that sees quite some adoption outside of the browser (e.g. via the WebAssembly Micro Runtime) recently, it was originally built to enable an entirely new category of apps to run in browsers. Except for some high visibility examples (Figma likely being the most well known), it remains slightly unclear how the average team would leverage WASM and what real world use cases are. Yet, we're excited to explore this space more and support the teams we work with experimenting what potential WASM can have for them.

Mainmatter + Rust = 🚀🔥🚀

anchorRust is a competitive advantage

Rust gives teams access to a level of efficiency, performance, and robustness that's far beyond that of most other technologies commonly used for web apps. Web apps written in Rust will have better response times while requiring fewer resources which saves money and energy (Shane Miller and Carl Lerche gave a talk about how using Rust helps minimizing the environmental impact of the systems we all build every day at AWS re:Invent 2021).

At the same time, teams working with Rust can have more confidence in their code because of Rust's rich type system and modern language concepts that eliminate entire classes of errors. That does not only make code more stable at runtime and less likely to run into unforeseen errors in production, but also makes it easier to make changes to systems and maintain them over time compared to dynamically typed languages (going back to strongly typed languages appears to be a general trend in the industry, most prominently to be observed by the huge success that TypeScript had over the past few years).

Finally, building systems in Rust is a competitive advantage in an industry that continues to fight for the best talents like no other. As mentioned above, Rust has been voted the most loved language seven years in a row and literally every engineer in the world™ is eager to work with it. Companies that can hire for Rust (and are willing to up-level people that are new to the language), will have no problems finding people for years to come.

anchorMainmatter ❤️ Rust

We believe betting on Rust will benefit the teams we work with and enable a bright future for Mainmatter at the same time. We're looking forward to helping our clients adopt Rust for their web projects through team augmentation and training

We've invested in Rust quite significantly already by

  • joining the Rust Foundation as a Silver member
  • having several people on the team help maintain crates.io on company time for several years now
  • running Rust workshops to help teams get started with the language
  • creating EuroRust, the conference for the European Rust community

We're looking forward to continue these investments, extending our involvement with Rust even more over the next years and helping teams find their path towards Rust. If you're interested in Rust and want to adopt it in your organization, reach out!

Team member leaning against wall taking notes while talking to three other team members

Grow your business with us

Our experts are ready to guide you through your next big move. Let us know how we can help.
Get in touch