4 ms·
> Tauri is an open-source electron alternative that is built in Rust. I'm not familiar with Electron development, but isn't the code mostly JavaScript in that
by sedatk 3y ago
> Tauri is an open-source electron alternative that is built in Rust.
I'm not familiar with Electron development, but isn't the code mostly JavaScript in that case? Does Rust have a meaningful contribution to the performance and the safety of the codebase here? I feel like Rust part would be "spin up the WebView". There is no code in the repository, so I couldn't check that out myself.
- awestroke 3y agoI'm building an app using tauri. More than 70% of the code is rust. The tauri codebase itself consists of a lot of Rust code, and it's based on two substantial rust libraries for cross platform window management and cross platform webview management
- sedatk 3y agoThat’s great to hear, thanks!
- bojo 3y agoI'm not sure about this project specifically, but Tauri let's you farm all of your business logic out to the Rust side with straightforward function calls and keep the web view a presentation layer.
- mustache_kimono 3y ago> Does Rust have a meaningful contribution to the performance and the safety of the codebase here? It apparently has a tremendous benefits: https://tauri.app/v1/references/benchmarks/ https://tauri.app/v1/references/benchmarks/
- josephg 3y agoAccording to those benchmarks Tauri still issues about 25000 syscalls at startup and needs about 300mb of ram for a “hello world” app. That might be slimmer than electron, but it’s still ridiculous given what it’s doing.
- mustache_kimono 3y ago> That might be slimmer than electron, but it’s still ridiculous given what it’s doing. Then I think your beef is with the class of apps, not Tauri or Rust. > Tauri still issues about 25000 syscalls at startup and needs about 300mb of ram for a “hello world” app How many syscalls and how much memory does your web browser require on startup? I'm not the biggest fan of JS apps, Electron, etc., but it's simply ridiculous to think this class of apps don't provide value. It's become chic to yell about the good old days when it didn't take your editor a few seconds to startup, and I agree, but I think this lament actually requires an answer 1) in the form of code, 2) in a language everyone can learn 3) that runs on everything.
- josephg 3y ago> it's simply ridiculous to think this class of apps don't provide value. They absolutely provide value. I’m not questioning that. I’m just sad and frustrated by the lack of any better options for application developers. We desperately need a good, lightweight, feature rich, cross platform application framework. Making something good will probably need an 8-figure budget at a minimum. Unfortunately nobody with that kind of money seems invested enough to make it happen. As a result, every computer on the planet is either slower or more expensive than it needs to be in order to run Teams / Slack / Discord / etc etc. It feels like a coordination problem more than a technical problem, with users suffering the most.
- palata 3y ago> We desperately need a good, lightweight, feature rich, cross platform application framework. Or those services should just expose a damn API and allow third party apps. I don't see what would be wrong technically with a lightweight Slack CLI app, a native macOS app, etc. Damn it's just about showing text on a screen... writing a third-party Slack client could even be a nice student project. It just means that Slack needs to expose a proper API (unfortunately "proper" is not the norm in our industry), and probably there is a business reason to not allow it that I don't see right now (maybe just cargo cult or wrong assumptions, those are typical reasons behind business decisions).
- sedatk 3y agoVery impressive.
- VWWHFSfQ 3y agoMy understanding is that Tauri allows building the presentation layer with standard web tech (HTML, CSS, JS) while using the system web view to render it. This has the major benefit over Electron that you don't have to ship all of Chrome in your binary. The downside is that now you have to support the peculiarities of the system web view (Safari, Chrome, Firefox, etc.)
- sedatk 3y agoThere is another benefit+downside: Web view can get security updates without you updating your software. But, that means your app might break at some point even if you haven't released any updates.
- OJFord 3y agoIn Electron you run a node 'server' and browser JS client (packaged up into one app). Tauri uses rust for the backend instead. So yes, in Electron 'the code is mostly JavaScript', but Tauri's offering 'let's do a piece of that in rust instead'. (And I suppose you could do the frontend in rust via wasm, but probably true of Electron too.) It's not just Tauri itself as a development tool that's written in rust.