avatarDr. Ashish Bamania

Summary

Rust is gaining popularity and is being used by various companies, including Microsoft, Figma, Coursera, npm, and Solana, for different purposes due to its memory safety, low memory usage, and multi-threading capabilities.

Abstract

Rust is a programming language that has been gaining popularity among developers for its memory safety, low memory usage, and multi-threading capabilities. The language has been used by various companies for different purposes. Microsoft is using Rust in the Windows Kernel to address memory safety issues, while Figma has used it to improve the performance of its multiplayer server. Coursera has employed Rust for secure handling of submissions and execution of grading scripts within grading containers. npm has rewritten its authorization service using Rust to address CPU-bound performance limitations. Solana, a fast and efficient blockchain, is written using Rust. Other companies that use Rust in their codebase include Deliveroo, 1Password, Atlassian, Cloudflare, Yelp, Dropbox, Honeypot, and HuggingFace.

Bullet points

  • Rust is gaining popularity among developers due to its memory safety, low memory usage, and multi-threading capabilities.
  • Microsoft is using Rust in the Windows Kernel to address memory safety issues.
  • Figma has used Rust to improve the performance of its multiplayer server.
  • Coursera has employed Rust for secure handling of submissions and execution of grading scripts within grading containers.
  • npm has rewritten its authorization service using Rust to address CPU-bound performance limitations.
  • Solana, a fast and efficient blockchain, is written using Rust.
  • Other companies that use Rust in their codebase include Deliveroo, 1Password, Atlassian, Cloudflare, Yelp, Dropbox, Honeypot, and HuggingFace.

Rust Is Getting Extremely Popular. Here Are Some Important Projects Using It. (Even The Windows Kernel!)

Generated with DALL-E 3

Rust is getting a lot of attention these days and it has been the most admired language among developers for 8 years straight!

Look at the plot from the Stack Overflow Developer Survey 2023.

85% of all developers that use Rust want to use it again next year. That’s huge!

Source: Stack Overflow Developer Survey 2023

I am not surprised that Rust is being admired to such a great extent.

It has a lot to offer. Seriously, a lot!

Let’s learn what popular companies are using Rust in their tech stack.

1. Microsoft & The Windows Kernel

A lot of core software today is built using C/ C++.

The same is true for tech built by Microsoft.

Interestingly, 70% of all Common Vulnerabilities and Exposures at Microsoft are related to memory safety issues.

And, despite a lot of effort being put into fixing these, they are still soaring.

Not losing hope, the Microsoft Security Response Center has launched the Safe Systems Programming Language initiative, intending to migrate their projects to Rust.

The following is a tweet from Mark Russinovich, the CTO of Microsoft Azure, and his intent on moving to Rust is very clear from it.

Starting with DWriteCore, the Windows App SDK implementation of DirectWrite, used for high-quality text rendering and font parsing, it now consists of about 152,000 lines of Rust code.

Microsoft is also experimenting with using Rust in the GDI (Graphics Device Interface) and Win32k components of Windows.

2. Multiplayer At Figma

Figma’s real-time collaborative editing feature called Multiplayer, helps its users to work remotely on a common project, share files, and review designs in a fast and less frustrating way.

The multiplayer server at Figma was initially written in TypeScript but as Figma rapidly grew more popular, the server was not able to cope.

TypeScript being single threaded couldn’t process server operations in parallel.

Rust’s low memory usage and multi-threading capabilities fixed Multiplayer servers so much so that the peak average CPU usage has fallen 6 times and peak worst-case file save time is 16.4 times faster.

3. Grading Programming Assignments At Coursera

Coursera securely grades assignment submissions inside hardened Docker containers that are managed by Amazon EC2 Container Service (ECS).

Despite the automation provided by ECS, Coursera requires additional orchestration for the grading process.

This involves the secure handling of submissions stored in Amazon S3 and the execution of grading scripts within the grading containers.

To address these challenges, Coursera employed Rust as it promises immunity to many security vulnerabilities that are encountered in the process.

Further details of this process can be found here.

4. Authorisation Service At npm

npm, the largest software registry in the world, handles around 1.3 billion package downloads per day.

Engineers at npm identified that their authorisation service (that ensures that only authorized users publish packages) had an alarming CPU-bound performance limitation.

They re-wrote this service using Rust and unsurprisingly, the service has been running for more than one year in production without a single alert.

What a bliss!

Source: Rust’s official website

5. Solana

Solana, a fast, decentralized, and super-efficient blockchain is written using Rust.

Solana, being blazingly fast, has a block time of 400 milliseconds and handles approximately 3000 transactions per second.

While this has only ever been achieved in test net conditions, Solana potentially can handle as high as 65,000 transactions per second.

This is —

  • 10,000 times faster than Bitcoin
  • 4,000 times faster than Ethereum and
  • 2.5 times faster than Visa

Founders at Solana also chose Rust (rather than Solidity, the popular language for the Ethereum blockchain), so that they could attract developers who can build high-quality scalable programs (smart contracts) instead of copy-pasting existing smart contract code.

Some other projects that use Rust in their codebase are:

  • Deliveroo, a popular food delivery service, to quickly make assignment decisions in their food delivery network
  • 1Password, a password management service, to power the entire backend (encryption, networking, database, and business logic) of all their client apps.
  • Atlassian, in their service for analyzing petabytes of source code
  • Cloudflare, in their edge computing and security services

Cloudflare using Rust, also developed Pingora, a new HTTP proxy that impressively serves over 1 trillion requests a day.

  • Yelp, in a framework built for real-time A/B testing
  • Dropbox, in their core file-storage system
  • Honeypot, in Searchspot, their search engine for finding the top tech talent
  • HuggingFace, in their latest open source Machine Learning framework called Candle

Have you used Rust in production yet? Let me know in the comments below!

If you found the article valuable and wish to offer a gesture of encouragement:

  1. Clap 50 times for this article
  2. Leave a comment telling me what you think
  3. Highlight the parts in this article that you resonate with

Subscribe to my Substack newsletters below:

Check out my books below:

Programming
Software Development
Rust
Tech
Software Engineering
Recommended from ReadMedium