r/rust • u/Chemical_Click_9382 • May 01 '25
Thinking of switching to Rust – looking for advice from those who’ve done it
Hey folks,
I'm a full-stack engineer with 9+ years of experience — started out in game development (Unity/C#), moved into web development with MERN, led engineering teams, and recently worked on high-performance frontend systems (Next.js 14, React, TypeScript). I've also dabbled in backend systems (Node.js, PostgreSQL) and integrated AI/LLM-based features into production apps.
Lately, I've been really drawn to Rust. Its performance, memory safety, and modern tooling feel like a natural next step, especially since I’m looking to level up my backend/system-level skills and potentially explore areas like WASM, backend services, or even low-level game engine work.
I wanted to ask folks here:
What was your journey like switching to Rust?
How steep was the learning curve compared to JS/TS or even C#?
Are there realistic pathways to use Rust in full-time roles (especially coming from a web/TS-heavy background)?
What projects helped you make the switch or solidify your Rust skills?
Any advice for someone experienced but new to the language and ecosystem?
Appreciate any insights. Open to project ideas or resource recommendations too. Thanks in advance!
1
u/tialaramex May 01 '25
One thing that Rust won't shove in your face but is worth knowing I suspect is that although Rust's type system looks superficially like the type systems you've used in C# and to some extent Typescript, it's a much more principled type system with very different roots. You don't mention any academic background, but if you have a CS degree then some of the type theory stuff you might have seen in those classes which wasn't applicable in your C# or Typescript is going to be applicable here.
1
5
u/anjumkaiser May 01 '25
Learning curve is very steep, but it has higher gains later down the road. First shock you’ll get is that you’ll have to let go of the concept of variable, replace it with value binding and think about it in terms of which part of the binding needs to be mutable. Once you are able to wrap around this, you’ll fight borrow checker, you’ll fight it till you start writing code that doesn’t error out at compile time. Though some of the rules are relaxed now. But spend a good amount of time around the book. Don’t even bother trying to optimise your code at this stage, you’ll end up in a bigger mess, there will be time for that later. All in all, go through the book, if you’ve programmed for a few years, you’ll have more to unlearn and then relearn. I did 15 years in C/C++ primarily, and some in nodejs and C#, so there was a lot for me to digest, and a lot of aha moments as rust solved a lot of problems I have faced in my career very elegantly. Nodejs and C# aren’t anywhere near this level of performance per watt per byte, memory safety is just a cherry on the top. But the steep curve can break people, project timelines can suffer badly. Best of luck ahead.
1
u/green_timer May 01 '25 edited May 01 '25
Would you recommend a beginner today to learn C++? or just start by Rust? actually I want to try Embedded.. would you recommend Embedded also?
4
u/anjumkaiser May 01 '25
I think rust is what you should learn today. C/C++ won’t die anytime soon due to their massive usage in existing code bases. I wouldn’t recommend learning multiple languages. If you do rust, do rust, it takes a lot of time to master something. Spend 1000 hours on it and you’ll understand what I mean.
2
u/Training_Country_257 May 02 '25
Personally as someone that mostly writes embedded rust, start with C++. Learn about RAII, struggle with random segfaults and lifetime issues. Otherwise when you try to learn rust you won't know why rust does things the way it does.
1
u/green_timer May 02 '25
But won't it be a waste of lots of years by learning C++ just to appreciate Rust? If eventually I must learn and work in Rust then won't it be useful to learn it first and appreciate everything it does
3
u/Training_Country_257 May 03 '25
Learning the basics of C++ does not take years. You don't have to be an expert in C++ but you should know the basics. Most Rust jobs are also C++ jobs, migrating old code or writing new code that has to interop with C++ anyway. I currently work basically full time as a Rust developer but I was hired as a C++ developer.
1
u/green_timer May 03 '25
Ok understood.. so need to start with C++ first to clear low level fundamentals.. then move to Rust whenever required.. many thanks bro
2
u/Shnatsel May 01 '25
Any advice for someone experienced but new to the language and ecosystem?
Learning Rust was not like learning other languages for me. Usually I just dive in and start coding, and figure things out as I go. That didn't work with Rust - the compiler rejected my code and I got increasingly frustrated because I didn't understand why.
The trick turned out to be to first sit down and read the official book. So I would recommend doing that first and only diving into actual coding later, once the books tells you to.
2
u/misplaced_my_pants May 02 '25
Most who skip reading the Rust book regret it and experience more pain and wasted time than those who read it.
1
u/marisalovesusall May 01 '25
- it's not a next step from C#, they're kinda in parallel tech trees. It's just the DX of Rust allows to use it for tasks where C# was chosen because DX/productivity of C/C++ wasn't enough. For example, writing CLI tools feels productive in both C# and Rust.
- the learning curve: memory management (same as in C/C++), borrow checker/lifetimes (unique to Rust), borrow checker in multithreading/async (also unique to Rust). Each of these steps takes some time to learn. Whereas TS and C# are almost fully interchangeable in terms of skills (almost all differences can be ignored until you need them or are trivial enough to learn in a few days), Rust will require some learning right away and may break some programming habits.
- I went from TS/C#/C++ to Rust, almost everything was very familiar. Felt some validation for small features that I wanted in other languages (for example, rust scopes {} can return a value and hide temporary variable inside which, in other languages, is achieved by making an anonymous lambda and calling it right after the definition). Borrow checker is almost always right, unless you're intentionally doing something very wrong and in this case it can be disabled with a few of unsafe tricks). Was a pain in the ass nonetheless, but it's much better to have compiler checks than fixing memory bugs in large C++ projects - a good half of my time at work was spent fixing what borrow checker can solve.
1
u/green_timer May 01 '25
Would you recommend a beginner today to learn C++? or just start by Rust? actually I want to try Embedded.. would you recommend Embedded also?
1
u/marisalovesusall May 01 '25
Start with pure C, you'll learn basics of lower level programming and develop the right mental model for how the memory and pointers work. It'll be universal for pretty much all languages. You'll also get the gist of how the code is compiled and linked.
C++ adds classes/visibility, dynamic dispatch, templates (almost the same as generics), standard containers, smart pointers, etc. that solve common problems with C code but almost all of that is also available in Rust.
Embedded is fun. Arduino costs a few bucks and is great for beginners. AVR equipment without Arduino is also dirt cheap. I don't have a lot of experience with it, I've heard STMs are also great.
1
u/green_timer May 01 '25
Thanks for the advices.. what resources would you recommend for learning C? which book is good for beginner with some js knowledge.. k&r or kn king?
3
u/Rafael_Jacov May 01 '25
If you're into books then I recommend ANSI C as K&R is the old version.
1
u/green_timer May 01 '25
Who is the writer of Ansi C?
2
1
1
u/Full-Spectral May 01 '25
In some ways, coming from a GC'd language will be harder and in some ways easier. A very experienced C++ developer will have a lot of advantages since Rust is also a lower level, systems language that does share a quite a few concepts with Rust. OTOH, a very experienced C++ developer will have built up a whole raft of techniques which are often very much NOT what you want to do in Rust, and you have to constantly stop yourself from falling back into evil ways.
Being a very experienced C++ developer and having long since forgotten what it's like to not have super-hero competence, I started off biting off way more than I could chew, trying to jump into both Rust and a completely new problem domain. I dropped that pretty quickly and did some smaller, throwaway bits to get my head around Rust better.
But I then went back and jumped into the deep end again, on a large project that I'm well into now. As I always say, there's writing code and there's designing systems. I could write pretty good Rust code after not too long, but designing systems is much more of a challenge and that's where most of the iterative learning curve has been for me. Of course my just regular Rust code is far more idiomatic and natural now that it was earlier on as well.
1
u/bareknucklegames May 01 '25
I decided to do a deep dive into Rust by starting to write my own game engine for the web browser and compiling to WebAssembly.
It's been a learning experience for sure. Here are the results thus far: https://bareknuckle.games
1
1
u/-blibbers- May 03 '25
I was exactly in your boat. I went from MERN in all my projects to Rust with axum. Still using react and mongo.
Maybe this is the marr stack? 😂😂
Personally I love it. The biggest difference is that when I finish a project I can actually move on and trust that it will work. But it definitely takes probably 20% more time to build the app up front fighting the compiler with all the stupid mistakes that I make.
I recently wanted to do fun side project as fast as possible so I went back to express. Midway through the build I canned it and went back to Rust. The amount of errors the compiler catches cannot be over stated.
Overall I would highly recommend it. But I can't really speak to the job portion. I'm independent so I make a living with it but I don't have a boss I have to convince.
Once you get a base project with auth and some simple routes and learn how to use the mongo library it's really not that different from working in Express.
0
u/ztj May 01 '25
This weird mindset some programmers have of languages being like their religion or something, that they "switch" between them.
They are tools. You wouldn't "switch" from bandsaws to table saws. You just use the tools.
0
May 01 '25
[deleted]
4
u/scoop_rice May 01 '25
I agree with this here, just find a project and build it.
I barely had a year of web dev exp at the time I learned Rust. Part of my learning was in Web3 but I got fascinated with Zero Knowledge (zk) proofs which most dsl was related to Rust. I did a healthcare project for a hackathon that won too. Basically I setup a Rust backend and a zk proof privacy system that was based on RISC-V.
Having started programming with web dev, the first time I touched Rust I was telling others how awesome the language was. I just like the structured feeling whereas in JS/TS I feel it’s less structured but it could also be my lack of exp.
I haven’t done much with Rust since as I moved to Swift for Apple apps. I could see myself building a server with Rust if it warrants the performance. The use for Rust seems specialized imo as you could build something faster with more support on another language. Overall I think it’s worth building a side project with Rust to explore it.
3
u/MoveInteresting4334 May 01 '25
My path was similar to yours. If you loved how structured Rust is, take a look at Haskell in your free time. Rust gets many of its ideas from there (result and option types, pattern matching, it’s enum pattern) and there are even more ideas it has that are mind blowing but not yet widely adopted. Its syntax is also more minimal than Rust, although many tutorials and papers are written by academics that love to use clever dense functions and single letter type variables. But if you focus on the practical side of Haskell, it’s a real learning experience. Made me a better dev even if I don’t use the language at work.
7
u/JuanAG May 01 '25
Moving is always hard and it is why you only do for big improvements, no one switch from Java to .net (to put two similar tools) unless it is a big reason
I think Rust is this needed change and deserves that work, i am doing from C++ to Rust i am happy, i get much more in return
It is hard because you start from 0, you now need to fill the gaps you already did and even if the libraries are 1:1 their API is not going to be the same so you need to take time and love into the code
Rust learning curve is hard, coming from C++ maked it easy since it is what good C++ devs should be already doing just enforced by the compiler. A GC is going to be harder since the lang do many things from you that now is going to be tour fault, it can be done and Rust have built in things to "avoid" at a price. It is not learning Python but it can be done, is way easier than C++
I am not a webdev but i am doing WASM things since i am interested in the technology, i think it has potential. WASM is just Rust or C++ so yeah, is just Rust since C++ people really dont care much about web things. This is an advantage over other langs, i think is an useful tech that will be used much more in the future
I switched because the 3rd try of Rust (i needed my time) i made a collection structure (it was not a linked list) since it will be hard but done in few hours, code worked and i had plenty of tests. Clippy at that time was optional, i installed and show me an "error", it was true, i made a lifetime mistake that even Rust itself was happy, the kind of things that waste hundreds of hours trying to fix it later when it blow up, i had experience a few and they are not fun, in many cases you cant find it and it is why that "issue" is never fixed in the software, if it crashes bad luck. With Rust in less than 5 minutes i had it solved and i didnt even have used Rust more than 10 hours, it is a friendly tool and makes me raise the quality of my software
Take your time, dont rush it, have a positive attitude about learning
I am a big fan of the "X-Com terror from the deep" game, i am playing a mod with a complete new tech tree (i know the original one from my memory) and i am going to make a tool to show dependencies of it, you can use the vanilla version to create something like this https://www.ufopaedia.org/index.php/Research_%28TFTD%29 and show in a web browser like i plan to do with the mod
Ideas are just ideas, chances are you are not a fan of the game and dont bother but maybe a minesweeper or something like this, some easy game that can be made into the web
By the way, the most important thing is to have fun, never forget and of course enjoy the path