Rust is Simply Awesome #RustWorthy Part 1
— Written by
In this first article of a series, sathish talks about what he thinks about Rust programming language and what you can do with it.
Hi People! This is Sathish, Developer at Skcript who loves to code with Node JS & Ruby. I’m learning Rust Lang as a hobby and thought about writing a blog post series every week on what I find interesting in it. We’ll talk about concepts which I come across. Rust is fascinating! So, We’ll talk, We’ll code, We’ll learn together.
Let’s get to the boring boilerplate question - “What is [Fill anything here]?”
What is Rust?
Rust is a System programming language which offers thread-safe memory efficiency, and safe concurrency. Your code will not compile if there’s a slight chance that it’ll fail at run-time. It has a friendly compiler that helps you in debugging and suggesting workaround if there’s any compile-time errors better. It also offers better IDE support. It is said that it can easily integrate with other programming languages. Mozilla was the first investor for Rust and continues to sponsor the work of the open-source project.
Rust does not have Garbage Collector like other common programming languages, neither do you need to allocate and deallocate memory manually like you do with other system-level programming languages, for instance, C++. Rust has a unique feature called Ownership which is next in this series.
What can you do with Rust?
Cargo is Rust’s package manager which manages dependencies and Crates.io is the package registry of Rust. When you build your Rust code, it creates a binary which can be run on any machine without the need for installing the Rust Ecosystem in the target machine. Yeah, it’s pretty much the same as Java’s “Write Once, Run Anywhere”.
Rust in Production
Dropbox’s file storage system uses Rust in production.
Firefox is almost rewritten with Rust. Ever wondered how Firefox manages to be fast & memory efficient? It’s Rust fellas!!
Firefox’s CSS Engine Stylo was rewritten with Rust which was previously written with C++. The LOC was reduced to 85,000 from 1,60,000 with parallelism, which the firefox team tried to implement twice with C++ and both the attempts went in vain. This increased the page load speed by 30%.
NPM switched its authorization service from Node JS to Rust which was previously a performance bottleneck.
Libra, Facebook’s permissioned blockchain digital currency is built with Rust.
The search of the VS Code is reimplemented with rust and powered by ripgrep.
What will I be doing in my future posts?
The last system-level programming I wrote was C & C++ in college which frustrated me with pointers and dynamic memory allocation. Now that I’m getting my hands Rust’y, I don’t have to deal with dynamic memory allocation. As a beginner, Rust’s so fascinating like the Louvre Museum of France when I look from the outside. Can’t wait to see and explore its core! I’ll be talking about what I learned from the week with some problem-solving exercises. Watch out for my blog post, every Saturday.
Next up in this series where I’ll be talking about dynamic memory allocation in Rust and what makes it so cool. It’s so interesting to see how Rust manages dynamic memory allocation and I’m excited to share it with you guys! Until next week, Bubye!
P.S If you code with Rust, and have any suggestions for me, please leave a comment below 😀
Up nextThe Top 7 Android 10 features