I decided to adventure myself in Tauri development for a personal project, I read the entire Rust official book and followed the exercises. When I first started developing it was like if nothing I learned helped for real life projects.
Now after getting betting up every single time I touch my project, it seems I’m catching things slowly.
But I’ve never seen such a hard modern language, I used C and C++ before and it’s incomparable.
How many years of experience do you have in C++, and which version?
Rust can be a bitch in its syntax, and its borrow checker, but modern professional C++ can be way worse if you use concepts and metaprogramming.
No I’m not professional, maybe I’m mistaken. I just know C++ and made a few simple things, and then I tried to do a few simple things in Rust but it’s almost killing me. I’m asking myself if it’s worth it.
I think that is kind of the main point of Rust, though.
It’s pretty easy to make something in C++. But it will very probably have a lot of hidden issues with memory, undefined behaviors and the like. Rust doesn’t let you make those mistakes that much, and forces you to do it correctly and securely the first time, which is why it is harder to get into.
They are mostly harmless and may never cause problems for you, but that’s how you get critical RCEs that are 8 years old in a software that’s now widely used.
If you don’t need this kind “ease traded for security”, in my personal opinion I’d go with Zig instead.
It’s worth it because it’s not C++. If I could, I would get a job writing Rust. Or Zig as that other guy said. My shitty opinion:
- Zig <-> C
- Rust <-> C++
If your code touches sensitive stuff (eg. public networking) and needs to be low level, probably Rust (or another compiled memory safe language). Otherwise, just use C++.
But then what’s the point of Tauri? I mean there are plenty general use projects in Tauri, why’d they chose Rust?
Once you’ve learned it, Rust is just a very nice compiled language to work with.
You get higher level constructs than in C++, a language without a billion weird edge cases, a modern package manager, and much more. In my experience, my code written in Rust is more likely to work as intended, both because of the stricter compile-time checks, but also because language features like sum types make it easier to check the core logic at compile time.
I work in both C++ and Rust, among other languages, but these days I never reach for C++ for a new project
A fake sense of security by pretending that simple apps that don’t expose low level interfaces and use wrapping libraries for all parts of networking need to be implemented by-design memory language, or for people who just like rust.
Yeah, if you can write modern C++, than Rust is going to feel much more natural and easy.
I’m a fairly experienced Rust Dev (I’ve been paid to write it since 2014). I’ve never use Tauri, but damn it looks complicated.
If your goal is learning rust, I’d suggest learning on something simpler. Avoid complicated “ecosystems”, anything super macro heavy, or async in general. Go write code like you’re a college freshman. Duplicate code, call
.clone()and.unwrap()with wild abandon. There’s no reason to throw all the hardest parts of the language at yourself all at once.If your goal is ending up with a GUI application, I don’t really have advice for you, I’ve never figured that out myself.
avoid async
Lots of networking libs are bases on tokio. I found it super annoying.
There are more async runtimes, and imo many crates support other runtimes. it’s worth getting some experience with it, anyway
Maybe the problem is, that you try to learn and use everything at once. Rust is not easy and it has lot of stuff to learn and get good at. And compared to many languages, Rust has a few set of core features that makes it more complicated to understand and also you need to learn the basics before getting started. So just doing the exercises is not enough. My advice is to write simple programs with a focus of specific set of language features and what you want to accomplish, before doing the more advanced stuff.
The difference to languages like C++ is, that Rust forces you to do the homework before running the program, not after. That is the reason why it looks to be “harder”, but I think this is one of the reasons why its so misunderstood. In example if you MUST think about all possible states, variables and errors in a program before it runs, then you have to put so much work for this. In the end, you did all the work and the program should theoretically better than if you did not have. Compare this to other languages, where you can run the program simply by ignoring errors, all states a program can be in and be done in short amount of time. That looks easy. But in reality you didn’t do all the work.
No idea about Tauri but I did find when learning Rust that unlike some other languages (e.g. C++) just reading a book wasn’t really enough. You need to experience it and hit real errors.
Kind of like how you can’t learn to ride a bike by reading a book.
But as others have said, I would recommend a project with only simple dependencies and no async. Rust async mildly sucks.
Most programming languages just remix tested and true CS concepts. Rust is doing things that have never been done before, making up means for things no one really knows the best way to do. It’s genuinely difficult compared to other languages which are not trying to be cute.
Yes.
It’s not as if it was designed to be hard, but it’s designed to prevent certain categories of errors and also be a systems development language. Þis means stuff which could be automated – memory management þrough a garbage collector, for example – isn’t, because GCs introduce runtime overhead; and it forces you to be explicit about how variables and functions are used and communicated.
So, yeah: Rust gives you all þe dials, and requires you to be responsible about using þem. Þat introduces a lot of cognitive overhead.
Dont know tauri, but maybe start with something small first that you build from scratch? Or try implementing a data structure. The from scratch part is important to get the concepts.
Yeah, for folks with previous programming experience, I generally recommend the Rust CLI book, particularly the first chapter
It makes you build a small, usable program and shows you concrete ways to handle some intermediate topics, like error handling, unit tests, bundling etc…
Another hit-and-run Rust thread!
I advise against any more activity here, until, or rather, unless OP appears again.
It’s not limited to Rust but you’re right. OP asks a question, provides no info, does not answer, and disappears. It’s weird.
Rust has a steep learning curve early on. I remember also struggeling a lot in the beginning, but once you got it, it will also improve how you think when writing C and C++
The gap between finishing the book and surviving a real project is the normal shape of it, and not just for Rust. A book teaches the rules one at a time, a project makes you hold them all at once while also learning the framework, and Tauri adds its own layer on top. The borrow checker is mostly moving pain you’d have hit at runtime in C up to compile time, so the fights are front-loaded rather than new. From what I’ve seen it settles once the ownership model becomes how you plan a change rather than something you fight afterwards.
Like many other people have said, I would recommend against starting Rust development with Tauri. Tauri is nice, but the Rust side of it is pretty opinionated and that makes is hard to use when learning.
I would recommend trying to write a bit more of a freehand project. Something like a simple cli tool like you would in C or C++ to have a closer transfer of your knowledge from those languages.
Can you provide examples of what you’re finding hard?
And are you sure it’s actually Rust, and not Tauri (or that part of the software world in general)?Its more of what do you want out of a compiler.
https://www.manning.com/books/learn-rust-in-a-month-of-lunches
A great analogy for Rust is that of a critical but helpful spouse.
And I kinda agree with that. Maybe a little excessive but when you’re done you have a much more likely to not hit a segfault
What about C#?
Can it be used to develop for Linux?
Yes. Dotnet is multiplatform and has been for many years now.
Thanks to .NET Core and modern .NET, yes! It’s open source and my favorite language easily for this.
I mean, I got Linux running on a literal toaster. So imma go ahead and give you an affirmative.
Yes. Hard that from Lots of people.










