My Experience Learning Rust as a Web Developer

At that time, I was preparing to develop a new desktop application. Can Rust really save me from being replaced by AI? Can I become the legendary “10x engineer”? As a web developer, I feel a bit uneasy about whether I can be considered a “real developer.” Moreover, since this is a desktop application, I really don’t want to write it once in Swift and then again in C#.

Therefore, Rust seems like a good choice that can solve these problems simultaneously. This article documents my experience learning Rust as a web developer.

My Background

I have been working professionally in web development for nearly 10 years. During this time, I have been trying to develop my own software products. Although each attempt ultimately only earned me encouragement from friends, I still enjoyed it because I love learning new things.

So, what do I hope to gain from learning Rust?

A Unified Codebase and Convenient Toolchain

As a Node.js developer, I am used to the “tool overload” ecosystem, so I hope to find a language with a built-in toolchain. I’ve heard that Rust’s toolchain is excellent, and it can generate executables that run on multiple operating systems—although this is not unique to Rust, it is very appealing to me as someone transitioning from scripting languages.

Easier Learning of Memory Management and Thread Safety

Rust provides framework support for memory management and thread safety, and I hope to better understand these concepts through this approach, rather than piecing together knowledge from various scattered resources.

Easier Handling of Memory Management and Thread Safety

JavaScript is a single-threaded, garbage-collected language (by the way, JavaScript’s event loop is really great), so I haven’t had much exposure to memory management and thread safety. I hope that by using Rust, I can avoid those “soul-crushing” bugs caused by unsafe code.

The “I Know Rust” Badge

As a web developer using Node.js, I’m curious: on the mountain of the “great crustacean” (referring to Rust’s mascot, the crab), do unit tests really flow like fine wine? Maybe learning Rust will make me a more disciplined programmer, or even make me a “real programmer.”

How Was the Learning Process?

I hoped my learning process would be orderly, but in reality, it was a bit chaotic. Overall, how does my learning experience compare to my expectations?

The Toolchain is Very Powerful

After using several programming languages’ toolchains, I found Rust to be possibly the easiest to get started with. Rust has a comprehensive standard library, which includes building and testing features, and this was a breath of fresh air for me—compared to the scattered toolchain of JavaScript. In fact, Rust’s toolchain even inspired the creator of Deno (Node.js’s competitor) to introduce some similar features into Deno.

160 Hours Later, I’m Still Learning the Standard Library

Learning Rust is not easy. I spent a lot of time trying to understand the ownership system and working to make thinking from this perspective more natural. After a month of focusing 40 hours a week on learning, I still don’t think it is easier to master than other languages. In fact, some aspects may even be more difficult. Besides familiarizing myself with Rust’s basic concepts, I also need to learn the “Rust way” of handling things. So far, I still have a long way to go to fully master Rust’s standard library.

Helped Me Avoid Many Runtime Errors

Although the learning process wasn’t easy, I did write a lot of Rust code that required shared memory across threads for my projects. In the process, I encountered many compilation errors that were almost incomprehensible, but fortunately, these errors, if they had occurred at runtime, could have thrown me into endless debugging hell. For a beginner like me, this protective mechanism is absolutely worth it.

The “I Know Some Rust” Badge

I completed the process from zero to project launch. Now, I have a project developed in Rust that is being used by real users. Although I can’t say I fully mastered Rust, this process has indeed made me confident in my ability to get closer to low-level development. That in itself is a great sense of achievement.

Should You Learn Rust?

I can’t give a definite answer yet. I am still exploring. However, I can say for sure that honing your skills is a very worthwhile endeavor, as it can greatly enhance your confidence.

At the same time, I also realize how valuable the flexibility I took for granted while using TypeScript is. TypeScript is very suitable for the workflow of web development. Even if I improve my proficiency in Rust, completing the same tasks in Rust may still take several times longer. Part of this is due to my lack of experience, and part is determined by Rust’s strictness.

Finally, I’m also curious: have you had similar experiences when learning a new technology? For those who have already learned Rust, does this resonate with your experience?

Click to Follow and Scan to Join the Group
Get Free “Rust Language” Learning Materials

My Experience Learning Rust as a Web Developer

Leave a Comment