Why should I want Rust in my project? #9990
Replies: 1 comment 2 replies
-
First off: Hello :) Welcome! To answer your question: Rust is core to Tauris architecture, alls its OS bindings and internal code are written in it and all of the team is thoroughly "rust pilled" as they say ;) Tauri is designed to leverage the fact that there is a compile-step to your application: That means contrary to the traditional design electron, nodejs and even browsers use wehere you have a pre compiled runtime that just runs plaintext JS files (or renders them) Tauri actually bakes them into the binary at compile time, it also strips out all unused code from the runtime and performs a number of optimizations. So in fact Tauri as a "runtime" doesn't really exist: it is just a Rust library that you can pull in to do things. To make this more approachable we then offer the JS API and getting started templates so you can be productive without having to touch the Rust files. But Rust remains core to the tool. One of the benefits of Tauris architecture is that you can easily pull in native code too though, Rust being the easiest ofc but integrating with C, C++, Swift, Objective-C etc is also possible. |
Beta Was this translation helpful? Give feedback.
-
Hi everybody,
So I just caught wind of Tauri 2.0 which is coming up.
I have to say, I'm very excited and I think the tech that's being developed here is amazing and beautiful.
As a Flutter and Android native dev, I already see this as a way better framework for running web as an app than Electron, React Native and (obviously) .NET MAUI.
The question that I'm about to ask comes from a place of pure interest and I mean no disprespect in any way when asking:
Why do I still have to do Rust?
Let's say I'm working on my web stack and I need to hook into the platform. Let's say Android because I'm an Android dev, right? I'd register my Kotlin plugin in Rust and from there on I can communicate between JS and Kotlin. Great!
There are Rust files in my project though. All the talks that I see seem to put "calling Rust from JS" in the spotlight. The Rust files are always there and actually they're kind of cluttering because I now have files for yet another programming language in my project.
I get a feeling that I'm supposed to think that this is nice and a big benefit from the talks that I see and the docs that I'm reading. But I can't see it.
Why should I want Rust in my project?
Beta Was this translation helpful? Give feedback.
All reactions