Hacker News new | past | comments | ask | show | jobs | submit login
[dupe] Tauri 1.0 – Electron Alternative Powered by Rust (tauri.studio)
715 points by Uninen on June 16, 2022 | hide | past | favorite | 238 comments



Tauri – Electron alternative written in Rust - https://news.ycombinator.com/item?id=29807022 - Jan 2022 (419 comments)

(The cutoff for dupes is a year or so: https://news.ycombinator.com/newsfaq.html)


That's tough to shutdown their 1.0 release announcement because of a general discussion a few months earlier.


Release milestones don't tend to make much difference in HN threads. Instead, what we get each time is a discussion of the project as a whole (as you can clearly see in the current thread.) Nothing wrong with that!—it's natural—it just means that different releases of the same product aren't really different stories from an HN thread perspective. From the perspective of the project developers, of course it's a major thing.

I wrote a longer explanation about this if anyone wants more: https://news.ycombinator.com/item?id=23071428


I don't think 1.0 releases deserve the same treatment as 1.3.2 Beta 1.

The SNI here is that Tauri has hit stable, an information that does change how a lot of people would approach it.

I might need an even longer explanation, though, because I don't get it still. There are projects like Blender which were allowed to the front page like 5+ times in the past year, exclusively with posts about new releases. The discussions always hit the same notes. Why is that any different?


It's not different, those posts get downweighted too when mods catch them. You can email them in if you notice something getting repetitive.


> but it means that different releases of the same product aren't really different stories, from an HN discussion perspective

Sorry Dang - I would have to point to you that YC companies term their releases as 'launch day' or 'launch week' with YC W/Sxx badge in the title get preferential treatment and are allowed to be discussed multiple times over year - why is that ? I dont want to name names here.


Do you mean the official Launch HNs for YC startups? They are indeed a special case, but not in the sense you describe. They don't get to happen multiple times in a year. In fact, each YC startup only ever gets one in its entire lifetime.*

Launch HNs do get special treatment in that we place them on HN's front page. This is one of three things that HN gives back to YC in exchange for funding it—those things are all clearly listed at https://news.ycombinator.com/newsfaq.html#yc.

Btw, don't be sorry! We want everyone to know how this stuff works, and we want it to be clear what the principles are (and that there are principles). Other than the three things I just mentioned, YC startups don't get preferential treatment on HN. They have to struggle for attention just like everyone else, and with the exception of a few community darlings, they find it just as tough going as everyone else, and aren't particularly happy about it.

* although I think I'm going to make an exception next week for a startup that did the very first Launch HN 5 years ago and is still kicking.


I completely get Launch HN part - that was not I intended. I've seen companies not 'launch' but incrementally present their releases from what they've built quarter by quarter with YC badge in the title of the post or in the guise of launch week. And have always wondered why are those incremental releases allowed to be discussed so successfully ? I would say YC badge shouldn't be allowed in first place in any post other than Launch/Job. Believe me these companies have become disproportionately successful from their peers although they lack substance within. As mentioned I do not want to name names.


Ah ok - sorry for misreading you! I'd have to see specific links to be able to say what happened. In principle there shouldn't be any difference between YC and non-YC companies/projects when it comes to this.


Theoretically someone could post their new 1.0 page https://tauri.app/ and it wouldn’t be a dupe. In general a big new release usually has an announcement blog post, and those can be posted without being dupes, and they’re more timely & relevant anyway.


Honestly, I think you all should consider changing that policy. Not only because I've seen it broken before, but because major version changes imply things can be broken at upgrade time, and features are settled for a long time. Good to let people know about major releases...


You're certainly going to see that and other policies get broken, but only because we don't see everything. There's far too much content here for us to see it all.

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...

The problem with changing that policy is that the front page would see a massive influx of "Foo 1.2.3 release" stories. This would not be a step in the direction of the global optimum (https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...).


Do you think even major (this.0.0) versions would cause the same issue?


For sure they can - in fact that was the issue with the current thread.

From an HN perspective the important thing is not the version number, nor even the significance of the release, but how recently the project last had a major discussion.

There's one workaround for this that might work sometimes: if software has undergone major recent work that is interesting in its own right, then an article devoted to the specifics of that particular project—the why and the how, with interesting technical details, and an explanation of that makes it hard and also what pain it solves / what makes it worth doing—might have a chance of generating a more specific discussion in the comments. That's what I would do if I had a big release that I hoped to get attention for on HN.

Even then, people are likely to mostly post generically about the project—just as announcements of new things from $BigCo tend to attract lots of generic discussion about $BigCo too. But if there aren't too many of those, we can downweight them and then the more specific comments can hopefully float to the top.


FWIW this post specifically links to the v1.0 release announcement in the form of "Tauri in 100 seconds" video that is now linked from the homepage; this is essentially their launch blog post.

The linked URL nor the video has not been posted before.

I'm just pointing this out as many projects seem to post their 1.3.2 Beta 1 blog posts and that seems to be ok -- or at least I see them pretty often.


I know it's annoying when we moderate HN this way and the project happens to be one that you care about, but it will make more sense if you realize that (a) we have to moderate for the general case—i.e. if we didn't have this rule of thumb, the front page would fill up with release announcements of popular projects, of which there are many every day; and (b) the issue with duplication isn't really about the article/announcements—it's about the resulting HN discussions.

That is, it's not primarily about the diff between announcement N and announcement N+1. It's about the diff between HN thread N and thread N+1. Comments in these threads are almost invariably generically about the project as a whole. You can see that with e.g. https://news.ycombinator.com/item?id=31764384 in the current thread - which is a fine comment in its own right. There's nothing wrong with these threads! The only problem is that we have to regulate how much repetition of them there is.


In my curious search for lighter Electron alternatives to implement Zoho Writer's (https://writer.zoho.com) desktop app: I found Sciter[1]

It supports multiplatform app development with HTML/JS/CSS and the entire engine's runtime is just about 5MB which is unbelievably small!

I further analysed how this was possible, what I found was beyond fascinating.

1. The author has wrote a compiler that supports JS with useful extensions like classes and fancy stuff, even before ES6 came into existence.

2. He had built his own layouting engine that understands HTML and CSS 3.0

Basically he's built a custom browser engine, but custom tailored for writing multi-platform apps. So it's super-fast without as much memory taxes. It's not backed by a BigCo or a huge community (I guess) and I'm not sure whether I'll pick it for a business critical app. But the way it's architected seems far superior than the shortcut approaches that Electron or most other alternatives take.

The project is not even new. It's more than a decade old which itself is amazing.

[1] https://sciter.com


I agree that Sciter is pretty exciting. It's tiny and very resource friendly, and the language extensions are quite nice. It also is much better at behaving like a desktop application than Electron. Oh, and did I mention there are Rust bindings?

The biggest drawback is that it only supports a subset of Web APIs, even the DOM APIs. Most sufficiently large libraries that do more than pure compute will use an API that isn't supported, so you can't just import a random chart library. Of course fixing that is a sisyphean task for a single-developer project like Sciter.

I still really like it, but if you use it be prepared to either modify the libraries you use or write your own code.


> The biggest drawback is that it only supports a subset of Web APIs, even the DOM APIs

Even bigger drawback is that it ain't Free, honestly. Sure, the licence allows you to use it if the users install the sciter runtime separately, but that ain't really am option beyond development imo.


Dynamic linking is allowed and you are allowed to ship those, so on Windows it's very painless. You just ship your Go/C#/Python/Rust binary with a sciter.dll that sits in the same folder. On Linux it's not quite as nice since you have to move the libsciter.so to the appropriate folder.

Of course static linking would be nicer, but I think it's fair to charge money for that (as well as for source code access). The project has to finance itself somehow.


> On Linux it's not quite as nice since you have to move the libsciter.so to the appropriate folder.

Incorrect. Linux doesn't care where you load a .so from. You could load it by using a path, or you could add a path to your LD_LIBRARY_PATH env var. You could even add it to your compiled binary's RPATH. All methods support relative paths. The latter requires a binary, but the first two work with nearly all scripting languages.


None of those options are any easier than moving it. No harder, but no easier.


I don't think I agree. You don't need root and you don't need to "install" anything with these other options; it allows the user to extract and run rather than extract, elevate, install, run. It clearly shifts some of the pain from the user back to the developer. It's particularly clearly a win if you're distributing your app on your website instead of via distro package managers.


A shell script provided by the app author can automate setting LD_LIBRARY_PATH and running the binary. It's very convenient for the end user. Lots of programs are shipped to Linux this way.


They are easier for the end user in certain cases. Putting the library in the system library search path requires elevated privileges (usually). Having your application run from a self-contained directory does not.


How many great projects will never be, from the common dev's expectation of free?


I think there is an oversized focus on everything being free. It started with Google being free but it really isn't since you have to view adds and get distracted.

Also think about a software tool that costs say $100. It ain't free but that's your hourly salary Mr. Professional Developer. Using only free tools is penny-wise and pound foolish.


I think paying once for a tool is outstanding and I fully support it. Prices can even be a lot higher, from my point of view.

The trouble is that everyone wants to be a landlord these days by charging rent instead of allowing you to buy a copy of the software.


No, my hourly salary is 1/10 of that. I would still pay for the license for Sciter if I had a use for it right now, but it isn't a trivial cost.


Agreed; don't pick the free-as-in-beer tool solely because of that. However, some of the free-as-in-beer tools are the best. And those you should donate to (if they accept it). :)


I see, the SDK is BSD but the runtime is freeware.


> Of course fixing that is a sisyphean task for a single-developer project like Sciter.

Every new feature also adds complexity and size, so it goes exactly against one of the main advantages of the project


The problem is, you can forget about the entire web and node ecosystems of libraries, because it's just not compatible with any of the standard stuff. You'll probably end up having to write almost everything from scratch.

Also, whatever you write won't then be usable in normal browsers. So it's essentially just another cross-platform UI library, with a DSL for the UI parts - of course that's still good enough for many people.


[flagged]


> Web and node ecosystem is rotten to the core.

As a web dev, I agree 100%. It's a mess.

> That's not a problem, but a very big plus.

...but if your business need/use case is to port with your existing web app to the desktop with minimal fuss (and you're willing to sacrifice UX), this in no way helps (unlike Electron). If you're going to have to manually rewrite everything for the desktop anyway, why would you want to do it in the DOM, using an older HTML version, a CSS subset, and a somewhat-compatible JS-lookalike? Why wouldn't you just write it in a desktop-native UI kit?


> ...but if your business need/use case is to port with your existing web app to the desktop with minimal fuss...

I pretty much understand this point and see that Electron help. I would definitely write desktop-native UI, maybe just because I prefer it. And in large programs it might be somewhat expensive. But on the other hand, I found writing QT programs to be much easier than messing with web stacks.


Bro I’m still rockin’ jQuery. I did some projects using React, then stepped back for a bit and asked why, then never used it again.


Even jQuery doesn't work on Sciter.


Nothing wrong with jQuery if it suits your use case! Sometimes mutating the DOM directly is simpler and more maintainable.

IMO React is a response to a problem that not all websites have (complex state-dependent nested UIs). At a certain level of complexity it's worth it, at another level it's necessary, beyond that it's insufficient... but below that it can totally be unnecessary and more pain than it's worth :)

Go with what works for you and your team!


That sounds like the worst of both worlds, actually. A web-LIKE language that only supports some, not all, of real browser features? Sounds like Internet Explorer all over again.

If you can't reuse the same code between web and the desktop, you might as well use a better desktop framework. This just creates a false positive lookalike that is surface-level compatible but really not reusable and maintainable, and trying to figure out which APIs are shared and which aren't would be more work than just working in a different language & environment altogether.


Which better desktop framework for cross-platform with some of the productivity available for web apps? Curious on your experiences because it's hard to avoid a lot of sprawl and inconsistencies over time.


That's a good question, and I don't know the answer :) I wasn't thinking about it that way, like as an alternative to QT or the Java stuff, you mean? That might make sense if your users don't really care about native look & feel.

Was more considering it from the perspective of web-native companies wanting some offline/desktop experience too


An hour in and c-smile (https://news.ycombinator.com/user?id=c-smile) did not invite themselves in a thread about Sciter ? Crazy :D

Sciter isn't exactly a custom browser engine, because it lacks many, many APIs that browsers would use. It just happens to also use HTML & CSS, but it's not Servo-lite or Chromium-lite with V8 slapped on.


sciter looks good, but just don't think about the recent modern web feature, current web feature is impossible to make it right/full by a small team, even ms can not catch up, so they just choose the chromium.

sciter is good if you are looking for make an app based biz which not depends too much on web spec.

EDIT: small app -> app biz


> sciter looks good, but just don't think about the recent modern web feature, current web feature is impossible to make it right/full by a small team, even ms can not catch up, so they just choose the chromium.

Not every feature needs to be supported, which feature are you referring to? Also, given the use case: what is required in your opinion? How does the shift in microsofts scope translate to the efforts to sciter? What did the shift imply?

> sciter is good if you looking for make a small app which not depends too much on web spec.

Since when is it a feature to comply to "web spec"? Why should anyone continue to comply with all new requirements? And why do you feel it is required for portable desktop applications? Why not settle on some proven essentials? And why I am talking about browser now?

Hopefully you elaborate your thoughts: I am sincerly curious about your opinion.


First of all, I do like sciter, it's fresh air in wails,webview,electron & tauri.

There are several cases why I prefer an electron: BrowserView, FileSystem api, newer css feature(Interop 2022 are greate), and all the newer js feature I use but I don't know it.

I'm a web dev, so I'm not comply to web spec but chasing it, as a web dev, I'm happy about this, so I take the web spec as granted.

If I'm building a app biz company, I may choose sciter. sciter is not "free" to use, I remember sciter used to tring allowed the static linking if the donation is good enough, but seems not reach the goal, which means can not get a static exe like https://github.com/wailsapp/wails .

BTW, I'm sorry for the small app part, small should mean adapt or bend to sciter.


Thank your for your reply!

> I'm a web dev, so I'm not comply to web spec but chasing it, as a web dev, I'm happy about this, so I take the web spec as granted.

Okay, now I see: As a web dev you are able to make use of all these new features. I do not know about current conveniences. FWIW is that CSS should be portable across any browser/web view. And given that browsers nowadays occupy tons of memory (even though they are written in highly performant languages) I am still impressed by sciters small shipping size.

> If I'm building a app biz company, I may choose sciter. sciter is not "free" to use, I remember sciter used to tring allowed the static linking if the donation is good enough, but seems not reach the goal, which means can not get a static exe like https://github.com/wailsapp/wails .

Thank you for the recommendation!! It appears to me that his previous attempts to market his product have left a serious impression. I do remember stumbling about sciter a while ago, neglecting it as well. But I can't recall my reasoning.

> BTW, I'm sorry for the small app part, small should mean adapt or bend to sciter.

No worries, thanks for your input!!


> CSS should be portable across any browser/web view. And given that browsers nowadays occupy tons of memory (even though they are written in highly performant languages) I am still impressed by sciters small shipping size.

Chrome is new IE since June 15 2022, and happy about it. Interop 2022 is about make safari and chrome get on the same page about new css feature.

Memory, portable CSS and browser compat is about cost, if I can make whole company install chrome, that can save a ton of money investing on support unexpected browser, one time install is way cheaper than continue support. If the company is big enough, there will be no problem, like google can rewrite whole Google Doc to canvas to support cross browser. If building a sciter based app biz, that's all your investing goes, that make sense.

[Interop 2022]: Blog https://web.dev/interop-2022 Current status https://wpt.fyi/interop-2022


i think the author swapped out his custom scripting engine for https://bellard.org/quickjs/ a year or two back.

(he also hangs out on HN)


Not to rain on the parade, but:

- What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are written in HTML/CSS/JS, just as in Electron?

- Isn't the whole point of Electron to have version/feature stability for the browser APIs by bundling a specific Chromium runtime? Without this requirement, it was also trivial before Electron showed up to write a small native wrapper application around the system-provided webview widget.


This is what I thought at first until I dove in more. AFAIK, Tauri makes it possible to write your ENTIRE app in Rust _EXCEPT_ the view. This means you can take events and send them directly to Rust for processing and vice versa. While porting an existing web app might not use any Rust, someone using this to specifically create a Rust GUI app can use the HTML/CSS/JS portion as just a view for their Rust app for the most part.


Hmm, I was thinking about writing a nodejs native module with rust to access some system library in an electron app for one of my side project, but using this might be easier instead. I guess I should check it out.


As a tauri user, I can highly recommend it. If you can write the backend code in Rust only it's very simple and you have a much smaller footprint than electron.


There's also more to it than just the webview windows:

- Cross-platform auto-updating

- Desktop tray features

- System notifications

- Menu stuff

These are some of the "extra" things that also made Electron nice.

You have a point about browser API compatibility, though. That's the big downside to using the system-provided webview widget.


> What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are written in HTML/CSS/JS, just as in Electron?

You're assuming the 'heavylifting' part of the application is in the UI itself. Imagine some data processing app where the heavylifting part would benefit from a backend running in Rust. Say, an image enhancer of some kind.

> Without this requirement, it was also trivial before Electron showed up to write a small native wrapper application around the system-provided webview widget.

Electron also made the packaging of such an app dramatically easier when building on macos/linux/windows.


But Electron apps can also launch separate programs written in any language with child_process.exec() e.g. ffmpeg wrapper GUIs


I believe Tauri has "sidecar" which does the same thing


But if you write your "backend" in rust, then with tauri you don't need a separate process, which may or may not be important depending on how your application works, and your tolerance for additional overhead.


It's an application framework, with UI being only one part of it. It has a native Rust API for writing non-UI parts of the apps in Rust. Plus there's a lot of Tauri's own code for window management, clipboard, networking, auto update, bundling, etc.

Another difference is that it doesn't need to bundle a Node.js or another language runtime.


I think it depends on your use case. Yes, a huge selling point Electron is being able to control the Chromium version. But, I can imagine a lot of less complicated apps don't need this.

Also, the Chromium renderer is only half of an Electron app. There is also a background thread running in node, which can pass messages to the renderer.

So, I can imagine that for apps that are more background thread heavy, swapping out node for rust could work quite well.


>I can imagine a lot of less complicated apps don't need this

Also, more complicated apps don't need this, the ones that want to control every aspect of the render, with SVG or Canvas.


> What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are written in HTML/CSS/JS, just as in Electron?

That is true. It's basically exposing a Rust API and using FFI to the Desktop APIs. Nothing special going on apart from hype and marketing and possible over-promising on features.

> Isn't the whole point of Electron to have version/feature stability for the browser APIs by bundling a specific Chromium runtime?

Yes. The selling point here is that there are no fundamental rewrites needed for using Electron but only small Javascript / Typescript tweaks to get it up and running. This is why unfortunately Electron is used all the time despite the giant negatives. As with Tauri, it is basically a wrapper around the system Webview and using Rust FFI to the Desktop APIs.

I'd rather bet on Flutter Desktop as a possible long term Electron competitor.


Do you need to own a mac to develop flutter desktop apps? If so, that'll limit adoption.


> Do you need to own a mac to develop flutter desktop apps?

No. [0]

[0] https://docs.flutter.dev/development/platform-integration/de...


Thanks.

"To compile a desktop application, you must build it on the targeted platform: build a Windows application on Windows, a macOS application on macOS, and a Linux application on Linux."

So, I essentially do need to own a mac if I want to target macs along with other platforms.


> So, I essentially do need to own a mac if I want to target macs along with other platforms.

If you want to target other platforms than the one you are currently running, then you need to compile and run on that target machine as well. It is not a hard requirement that you need a Mac to develop Flutter applications. The Flutter SDK is also on Windows and Linux machines as well.

It is exactly the same thing for Tauri. [0] This is why they tell developers to use GitHub Actions or CIs to do it for them. Again, the same can be done for Flutter.

Electron on the other hand, does not need any of that.

[0] https://tauri.studio/v1/guides/building/cross-platform


So people who use Rust will be interested if they were looking for a GUI framework?


Well it’s a fun way to trick them into writing html/js for those GUIs.


That’s the point of Tauri. UI is html/css/js, and the backend logic is Rust.


>What's the point of mentioning Rust

marketing


I find it fresh and positive that Tauri developers take security very seriously. Before this 1.0 release they ordered a full security audit for the codebase and published the report ( https://github.com/tauri-apps/tauri/blob/next/audits/Radical... ).

The project encouraged me to better my own workflows too, as even the awesome-tauri repo requires signed commits in the PR template :) ( https://github.com/tauri-apps/awesome-tauri/blob/dev/.github... )


Tauri is such a breath of fresh air for a web developer like me! I picked up Rust because of it, and was easier than I thought (I've read lots of "Rust is hard" articles).

The application I wrote is a Hacker News client with focus on offline reading and listing comments in threads sorted by time and flat, instead of trees sorted by score (which incidentally, also works as a web application which is deployed here: https://ditzes.com/).

I found it helpful when I'm traveling but still want to read discussions, useful for following along threads that are actively being discussed (this submission can be seen at https://ditzes.com/item/31764015 for example) and also useful when using HN comments as reference to something I'm building. Guess I'm also pretty proud that the client is VERY fast, loading 1000 comments in something like 1s (because of the caching). Like this thread for the Coinbase layoffs: https://ditzes.com/item/31742590 (1001 comments)

The Tauri application currently works with 99% of the features of Ditzes, but the mouse "back" button doesn't actually navigate the internal browser back in history with Tauri yet, so I haven't done a "Show HN" yet as I consider that a essential feature of Ditzes (for following along threads via the "View" link) before "launching" it.

The Tauri-part of the source can be found here: https://codeberg.org/ditzes/ditzes/src/branch/master/src-tau...

Overall, besides the extremely long compile times, Tauri has a been a pleasure to develop with, and I'd definitively use it over Electron in the future. Really looking forward to mobile support as well, as then I'll finally have a comfortable and offline-capable HN client for my cellphone.


Do you use mold as your linker?

If not, can you try using it and let us know whether it improves your compile times or not?

Here's the instructions for using it with Rust: https://github.com/rui314/mold#how-to-use=


Sure thing. Compiled mold from source and got the following numbers when compiling Ditzes:

- Debug build from scratch: ~1m 20s

- Incremental debug build: ~3s

- Release build from scratch: ~3m 40s

So, seems that helped quite a bit, thanks for the tip :)

As someone who is generally unaware of things as I'm new to Rust, is there any drawbacks to using a non-default linker? Everything seems to work fine as far as I can tell, but no drawbacks mentioned in the repository of Meld makes me slightly skeptical.


The drawbacks of mold are:

- It's linux only (macOS support WIP)

- It's still somewhat experimental. It may not be able to link everything. There may be bugs.

Having said that, it's written by someone with a lot of experience writing linkers (they previously worked on lld), can link codebases as complex as chromium, and generally seems to work well for most use cases.

A common pattern would be to use mold for development, and then the regular linker (varies by platform) for release builds.


> A common pattern would be to use mold for development, and then the regular linker (varies by platform) for release builds.

That makes a lot of sense. Thanks for sharing the potential drawbacks and possible solutions to those :)


Overall, besides the extremely long compile times

Out of curiosity: fresh builds or also incremental builds? If the latter, how much of it is linking?


Both :) But what bothers me most, is the slow incremental debug builds. But that's a general Rust problem, although seems extra bad with Tauri.

My project has ~1700 lines of Rust, ends up pulling in ~700 dependencies and changing one line in main.rs takes about ~20 seconds for the debug compile to finish (on a 5950X CPU). Fresh build takes about 1m30s but that only happens on CI, so not really a problem day-to-day for me. Full CI build on Codeberg/Woodpecker takes around 5 minutes from push to release created, but that's including other things too.


> [...] My project has ~1700 lines of Rust, ends up pulling in ~700 dependencies [...]

I have no experience with Rust. Having 0.4 dependencies per line (so every 3 lines you are dependent on a 3rd-party) sounds very extreme. Can you elaborate a bit what those dependencies are (like many std libs?)?


You can see for yourself here: https://codeberg.org/ditzes/ditzes/src/branch/master/src-tau...

My project have ~30 dependencies defined for various features in the client. The rest are transitive.

Here is the output of cargo tree for your leisure: https://pastebin.com/aep1bX4v

A quick scan of cargo tree seems to indicate most of them comes from tauri and actix projects.

Edit: oh, and also tantivy (a search engine) ends up pulling in ~300 dependencies which is a pretty big chunk of the total


Something for people to keep in mind that this is pulling in the source for:

- An electron-like framework

- A web framework

- Multiple HTTP clients

- An HTML parser

- An image editor

- A search engine

Some potential dependency savings I noticed:

How come you pull in both isahc and reqwest? On the surface, don't they fill the same role? Similar for rustls and openssl.

If you upgrade your readability dependency, you will only pull in reqwest once instead of twice. Might be useful to run `cargo tree -d`.

I'm not familiar with savefile? What does that get you over serde_json which you also pull in?


Thanks a lot for taking a look at the dependencies! I'm gonna be honest and say that I haven't spent much time "optimizing" anything, I haven't even arrived at a "first" version yet with Ditzes. But with that said, you have some good points :)

> How come you pull in both isahc and reqwest? On the surface, don't they fill the same role? Similar for rustls and openssl.

Yes indeed. I started with using reqwest, but it's no longer used and only isahc is used, so reqwest can be removed from the list.

Same with openssl/rustls. Started with rustls, but not longer used, so can also be removed.

Simply forgot to remove them at one point I guess.

> If you upgrade your readability dependency, you will only pull in reqwest once instead of twice. Might be useful to run `cargo tree -d`.

Ah, that's good to know. I'll do that once I put in some other changes, thanks!

> I'm not familiar with savefile? What does that get you over serde_json which you also pull in?

Rust savefile persists structs as binary data on disk, and also have versioning. Started out persisting everything as JSON, but loading thousands of posts (or even hundreds) from disk and deserializing them from JSON turned out to be quite slow. So using savefile mainly for performance, but I like the versioning/migration aspect of it as well, although I haven't used it yet with Ditzes.

serde_json is mainly used to parse responses from the HN API and to output JSON from the HTTP API, if I recall correctly.


`cargo udeps` tries to uncover unused dependencies. I wish we had more reliable ways to detect it so we could integrate it into cargo.


That will be including transitive dependencies. Consider how many dependencies making a HTTP request will pull in. Ones for network IO, ones for parsing HTTP request. Possibly separate ones for HTTP1, HTTP2, HTTP3. Ones for type definitions of HTTP requests. Rust convention is to publish these bits as separate crates even if they are published by the same maintainer(s) so as to improve compile times (separate crates can be compiled in parallel) and modularity (if you're writing a competing library then you can share the internals of the existing implementation when possible).

This isn't like C++ where a single dependency is a huge project. Some crates are literally just trait (interface) definitions.


I compiled popular Rust projects before. It never pulled less than 300-400 dependencies. :/


Indeed. Here I took a random sample from https://github.com/topics/rust and listed the amount of dependencies from running `cargo tree` (full command: `cargo tree | awk 'NF' | wc -l`)

- denoland/deno (nodejs-like runtime) - 1550

- alacritty/alacritty (Terminal) - 303

- sharkdp/bat (`cat` clone) - 249

- meilisearch/meilisearch (search engine) - 1128

- starship/starship (command line prompt) - 427

- swc-project/swc (JS/TS compiler) - 1869

- AppFlowy-IO/AppFlowy (Notion clone) - 1146

- yewstack/yew (Rust/WASM web framework) - 942

- rustdesk/rustdesk (remote desktop) - 648

- nushell/nushell (shell) - 858

- ogham/exa (`ls` alternative) - 61

So yeah, seems even things as basic as a `cat` replacement ends up with 249 dependencies. Lowest amount of dependencies is a `ls` alternative, which ends up with 62 dependencies.


cargo tree | wc -l tends to over-count dependencies a lot because there are many very common crates.

Use grep package -F '[['package Cargo.lock | wc -l instead. This is doubly true if you pull in multiple crates using the same framework behind it, e.g. in async projects. E.g. for exa this is 45 instead of 61. For deno this turns into a 3x difference (515 vs. 1571).

Other reasons, besides what has been mentioned (vendoring being very uncommon, crates existing for common type and trait definitions, crates being generally scoped more narrowly resulting in more smaller crates), a lot of crates have additional crates for macros. Bindings often end up being a whole bunch of crates for this reason (i.e. one xyz-sys crate for the FFI bindings, plus one or more crates for a rusty wrapper and perhaps one or more crates for convenience crates). Case in point from deno's dependency tree:

    ├── futures v0.3.21
    │   ├── futures-channel v0.3.21
    │   │   ├── futures-core v0.3.21
    │   │   └── futures-sink v0.3.21
    │   ├── futures-core v0.3.21
    │   ├── futures-executor v0.3.21
    │   │   ├── futures-core v0.3.21
    │   │   ├── futures-task v0.3.21
    │   │   └── futures-util v0.3.21
    │   │       ├── futures-channel v0.3.21 (*)
    │   │       ├── futures-core v0.3.21
    │   │       ├── futures-io v0.3.21
    │   │       ├── futures-macro v0.3.21 (proc-macro)
    │   │       │   ├── proc-macro2 v1.0.38 (*)
    │   │       │   ├── quote v1.0.18 (*)
    │   │       │   └── syn v1.0.93 (*)
    │   │       ├── futures-sink v0.3.21
    │   │       ├── futures-task v0.3.21
    │   │       ├── memchr v2.5.0
    │   │       ├── pin-project-lite v0.2.9
    │   │       ├── pin-utils v0.1.0
    │   │       └── slab v0.4.6
    │   ├── futures-io v0.3.21
    │   ├── futures-sink v0.3.21
    │   ├── futures-task v0.3.21
    │   └── futures-util v0.3.21 (*)


Deps are a transitive tree. The number of deps for enduser code for a framework like this will always be high. That is kinda the point. A small amount of end user code uses the work of thousands.


I wonder if there are any plans to buttress this issue with Rust. Last time I checked the issue was that there is/was no ABI stability which meant you couldn't have precompiled libraries to build against. The only way around it at the time was to expose C compatible APIs, but that means of course giving up much of Rust's strengths.


I recently developed a similarly sized APP with tauri + rust (3kLOC+~250 deps) and found that using mold[0] as a linker helped quite a bit for incremental builds. There were also a few other bits, like decoupling the build step in tauri from the frontend build, that helped.

[0]: https://github.com/rui314/mold


Yeah, separating things is what I ended up doing as well. Ditzes is currently four parts: API, CLI, frontend (CLJS though) and desktop application. Most of the time when developing, only the API/CLI/frontend changes, while I just do desktop builds to check it from time to time.


> (on a 5950X CPU)

Incremental builds are unlikely to benefit from multiple cores. I have a 5900x Desktop and recently bought a Laptop with 12700H. For some incremental builds, I'm getting the same performance. The Desktop Ryzen shines with full multiple builds (where the laptop gets hot and has to sabotage itself); or with running multiple programs without noticeable performance impact.


Depends on the linker, no? My understanding is that mold is able to parallelize much better than the the default Rust linker.


I haven't tried mold. I already face lots of difficulties with the current linker since I need to deploy to multiple architectures, so I can't imagine how that would be with Mold (but then maybe that's why I should try it!)


What do people compare with when they complain about 20 second build times? That doesn't seem like anything for a thing that one doesn't need to do very often. You can still do cargo check without taking so much time, right?


`cargo check` is what my editor runs automatically to find type errors, that runs automatically on every save. It doesn't allow me to actually "check" that the application does what I want it to. I run `cargo run/build` when I need to "humanly" test the application, and waiting 20 seconds for it is pretty bad.

But then I come from a dynamic application development background (mostly Clojure), so maybe I do have a pretty unfair view on how fast I should be able to make a change and see the effects (sub second is the usual wait time in Clojure land).


Right, for that use, anything above 1 second is pretty bad. 20 seconds obviously breaks the flow completely.


This looks fantastic, and Electron needs some competition.

That said, here's my set of hesitations as an Electron app developer (Beekeeper Studio - beekeeperstudio.io).

1. With Electron it's nice to be able to lock the browser implementation across OSs. I'd have some pause about having to support arbitrary Webview implementations. It makes testing so much harder.

2. It's really really nice to be able to code-share between UI code and app backend code. In Electron everything is JS, so you can use the same codebase for both components. With Tauri it requires two languages and two sets of packages.

  - One example of this is an ORM for a SQLite database. I need to load some settings before the UI renders, in Electron this is the same ORM code.
3. The only Linux build is a DEB.

4. Smaller community - desktop apps are a total PITA to debug, it helps that Electron builds have been tested at length by companies like Microsoft.


> 1. With Electron it's nice to be able to lock the browser implementation across OSs. I'd have some pause about having to support arbitrary Webview implementations. It makes testing so much harder.

Isn't this the same as you have for web, but with a much smaller set of browsers to support? Ie if you're doing a web app anyway, you need to solve that problem.


Most quality electron apps are NOT web apps. Beekeeper Studio included. It's a full desktop app in all terms, everything is local, no remote asset loading or anything like that.

For folks turning web apps into desktop apps, sure it doesn't matter as much, but a real desktop app is way more integrated and feature-full.


Yeah. Totally respect the approach. But what I mean is that the practice of making browser compatible web apps is well established so it isn't necessarily a deal breaker to have a couple of different rendering engines. I can count on one hand the few discrepancies I've found when using Tauri.


This seems a very interesting addition to the Rust ecosystem. I wonder how much traction it will get, though.

Some days ago there was an HN thread about Rust, conversing about the steep learning curve of Rust. The conclusion frequently is that maybe Rust is great for financial systems, kernels, rendering engines, media processors, etc... but just not necessarily the best tool for the job when there is no pressing need to avoid GC, and/or to squeeze the maximum performance while at the same time maintaining memory correctness. Which, on the other hand, tends to be the immense majority of application development out there...

So Tauri seems to me has a similar issue than the Qt Framework (built on and for C++): its adoption as an Electron alternative might not be as much as it deserves, because of the difficult to learn programming language that is behind it.

Thoughts?

EDIT: I know Tauri is just a WebView component, but programming in Rust still seems to be an important part of developing apps with it (it is even prominently featured in the 100 seconds video of the entry)


This is a known downside: rust forces you to write correct code, and will refuse to compile until you prove to it that you don’t have data races, all errors are handled, etc. If it’s a one time script, I still whip out the trusty Perl one-liner, because correctness doesn’t matter.

I would argue, however, that the vast majority of software would benefit from the rust compiler. The type system is very powerful and modelling your problem in it lets you think about the problem explicitly and guarantees safety around its usage. You can refactor without worrying about the entire codebase breaking, and the doc and testing system is some of the best I’ve seen.

Rust lends itself naturally to writing large maintainable codebases, and I think that this is a much more important aspect that how quickly can you get the initial build out the door. Reliability is not just for the kernel and rendering engine.


> rust forces you to write correct code

And to that extent, due to the lack of GC, you need to provide it (and keep in your head) with lots of extra information that wouldn't be needed with other languages.

I find that Rust is too strict because it assumes concurrent multithreaded code by default. Which wouldn't be needed for most desktop apps. Why no circular refs or having a mut ref and a ref at the same time, in my simple single-threaded To-Do list Tauri app?


I disagree, and I'd be fascinated to hear more of your perspective here.

I love Rust precisely because I can keep extra information out of my head. When I express something with the type system, I can stop tracking it mentally, and just rely on the compiler to keep track of it for me. With dynamic languages, I have to track far more mental state.

"Mutable xor shared" does not have anything to do with concurrency or threads. Here's one example in the Rust Playground: https://play.rust-lang.org/?version=stable&mode=debug&editio...

If this were permitted, then this example would have use-after-free whenever myvec reallocates its storage. No concurrency needed.

I'm not sure what you have in mind for circular references, but I don't know of any complications with circular references that have anything to do with concurrency.


You can use tauri without concerning yourself with rust at all. You can use typescript or JavaScript. Optionally if you want too you can write backend stuff that needs to go fast in safe or unsafe rust. It's kinda dreamy if you need to access drivers, or other things that are very uncomfortable to do in js.

When you get comfortable with rust it's just like any other language you might use. Yea it has safety benefits but it's just a nice language.

People talk about rust like it's impossible to learn, or not worth it, I think it's a language every programmer should learn at some point to fact check their understanding of memory management. It does take a few weeks to figure out for some people, but writing basic/easy/sane rust isn't a challenge at all.


For electron based apps, most part of the codebase runs on the chrominum front-end - written in JavaScript / HTML. Usually only some critical code runs on the node backend.

As such then, the proposal from tauri is to run majority of the application in JavaScript / HTML ecosystem, while the critical parts can be offloaded to Rust. Even the filesystem access is possible in JavaScript side itself.

From that sense I feel this is a good tradeoff.


> the proposal from tauri is to run majority of the application in JavaScript / HTML ecosystem

That's a decision the developer has to take, but I'd rather see it as the opposite: the sensible approach is to run just the UI related things in Javascript, and run almost all of your business logic in Rust.


That's how I use it too, mostly because I personally find JavaScript and typescript frameworks harder to use than rust. Managing data in js is hard for me without static typing. Everyone will have different comfort levels but I agree, business logic in rust, front end in js is a great separation.


Well I agree that it is already a good tradeoff, being able to offload the most intensive tasks to Rust, which is really performant. However my perspective is that of a C++ developer already, so I like Rust as a "better C++"... it's just that I'm not sure others will see it with such kind eyes :-)

On a tangent, I've been forced to learn and use Swift the last couple weeks, and to my surprise it has been a delight! If it had a more cross-platform spirit, I think I might have found a new favorite of mine for general application development.


Tauri is "just" a system webview wrapper. It's an interesting alternative to Electron for some applications because the installer is much smaller, but it also has downsides compared to Electron (the system web view will be updated independently and may unexpectedly break the application).

As far as I understand, applications are not written in Rust but in HTML/CSS/JS.


> As far as I understand, applications are not written in Rust but in HTML/CSS/JS.

Frontend UI yes. But enables you to use rust for your background worker (Electron apps use node for the background worker)


There's a communication channel between the Rust code and the JS running in the browser. It's possible to move as much functionality to Rust as you want... It's even possible to compile Rust to WASM to use that in the "frontend" though that from my experience is very cumbersome due to the Rust bindings for the Web API being pretty terrible.


You can sidecar any exe. E.g: side car a python fast api service that mimic a website api you call from ajax in the JS.


For anyone not on board because of how the WebViews work, or that it uses WebViews at all, the roadmap has other renderers to be explored. I believe the majority of the Tauri framework is decoupled from "web" and it's merely supported first - likely through popularity.

When WebView2 goes multiplatform, you might even be able to use it on every platform (if you like web, but want a consistent browser engine on each platform)

I'm more interested in where Tauri will go next in terms of support - not where it is on day 1.


What browser engines do you even have to support with WebViews? I assumed it would be Blink on modern Windows and WebKit on macOS.


They should adopt servo or help revive geckoview, to have an independent default.


An alternative to Electron I like is Vercel Pkg https://github.com/vercel/pkg .

You write a server in Node.js, compile it to an exe with Vercel Pkg and users run the exe on their local machine and use it with their browser.

Instead of running an app "in the cloud" they run it on the server on their machine. But the server could easily also be moved to the cloud as well.

Using a browser to connect to an app running on your local machine has the nice feature that you can open any number of browser-views on it, looking at the app and your data and tools from multiple viewpoints. Since it is local they are the only user and don't need to login or "keep a session" and can thus interact with the app in multiple ways in parallel.

I don't need to design in a feature that allows users to "open a new window". That is handled by the browser. Open a new tab to the same or different (bookmarked) url.

Plus there is a benefit to coding both the server and the client in the same language.


This is neat, but it's only an alternative to Electron in the sense that it's an alternative to building a desktop app.


It could be a server running on the local machine serving only requests that come from 127.0.0.1. Then from a user's point of view it is not much different from a "desktop application". You start it up locally and connect to it with a browser running locally.


For anyone coming from the rust side and just looking for a cross-platform rust frontend framework: although not covered in any details by the docs, you can cut out all the web stuff and run everything from cargo.

I have a small `hello-world` example of a rust-only Tauri application at https://github.com/Japanuspus/tauri-from-rust


Here is another one https://github.com/wailsapp/wails powered by Golang, but both of tauri and wails do not support BrowserView like feature in Electron, which means you can not build a brave browser on top of them.

Depends on your skill set, wails maybe better, think building a UI based tailscale app, just make the embed web part display directly instead behind a http.Server with extra 3-5 MB


It's been submitted today too: https://news.ycombinator.com/item?id=31764773


By the same person you are replying to :-)


Wails doesn’t seem to have a plan for supporting Mobile OS’s. Tauri has that on its roadmap


If I'm trying to bring app to mobile, ionic is my first choose. Like fluter is not the first choice to build a web app. For tauri case, most tauri app shared part is web based, you can just put it into ionic, and deploy for mobile now.


Been using tauri since it was in alpha for hobby project. Experience overall is pretty good. You really can call backend rust from js, in a lightweight browser window.

It is probably the most approachable technology for me for making desktop apps these days. Much leaner than electron, like it says on the tin.


Coincidentally I enjoyed this article yesterday about using Tauri and React to quickly build a desktop app: https://betterprogramming.pub/how-i-created-the-focus-app-us...


Tauri is very well designed, from an app model to its component parts (wry, tao). In short, it’s a platform that allows writing Rust as the backend and use of the OS webview. So light and fast.

I think and hope that many new desktop apps, even from the new big player, will be done in Tauri. I plan to use it for some of our future apps.

I know mobile is a whole other beast, but I hope Tauri can also crack this one up. That would be amazing.

Tauri rocks!


Doesn't native messaging API already do this? Why redevelop an API that has existed for some time.


What do you mean "native messaging API?"

Tauri offers a very elegant, secure, and effective way for the WebView JS environment to communicate with the Rust backend. It's not a trivial task to do this effectively and securely, let alone with something ergonomically pleasing.

Anyway, what "native messaging API" are you referring to? Perhaps they missed something obvious, but I found that unlikely.


I was thinking of the extension API but realized after that doesn't cover web apps. It's unfortunate the Web App Manifest hasn't created a permissioned way to communicate with a native app. If they had, it would solve most of these challenges since the standard seems pretty much supported on all platforms. I guess a local app could always run a local web server and potentially communicate that way


Yes, and as you can see, things are not that trivial.

At the high level, you can approach it in two ways.

- WebView to localhost would be the first solution but is inherently not secure (or needs lot of work to make it so, and still)

- Another way is that the app container that bootstrap the webview have a scheme to serialize/deserialize JSON message between the JS environment and the app container (in rust in this case). And that is what Tauri nailed down.

In fact, Tauri also supports localhost, in prod and dev. And where it becomes insanely good is that for dev, you can use localhost and use something like servor to have hot reload when you can UI code, and when its time to pack your app for distribution, it bundles those html assets part of the binary.

Anyway, some Rust marvels are out there, and this is one of them.

(btw, this is for desktop applications, not browser extensions)


Yeah, it does fill a gap but what appears to be a temporary one. Web apps can already be installed like an application, and now include window-control-overlay amongst other things. At one point I think Safari was slacking, but may have mostly caught up. As you mentioned, once an option exists for passing messages from browser to a native app (similar to Native Messaging but for Web Apps) then it would make more sense IMO to just use the browser's existing support.


I've always felt Tauri was too early to be a viable electron competitor, but now that I've seen it used in a huge project (Spacedrive), I think I might reconsider.


> Spacedrive

woah! this looks awesome, thanks for mentioning it.


The other lightweight alternative to Electron is Neutralino.js:

https://neutralino.js.org/


Like Tauri, this is only lightweight in terms of download size as it doesn't download chrome. The 'bloat' of electron is really at runtime due to loading a full browser engine. Both neutralino and Tauri will use roughly as much ram as an electron app, give or take. You're only saving on download size.


This is false, with every electron app, you're loading ~200MB into RAM to handle the main browser process.

With neutralino you're using the system main process, so you're only spawning a new browser thread.


Yes, but the the new browser thread is about 180MB witch depends on platform, on windows, I think the webview2 is the same as electron.


In electron, that would be a total of 380MB then, because it's both the main process plus the main view's isolated process.


Isn’t that because windows webview (with edge now) is chromium?


This is only the case for Tauri on Windows because the native website is just Chromium. On MacOS it’s much leaner. I can’t find the thread where the Tauri devs mentioned a plan to fix this, but iirc they do have one.


If you want to see even more alternatives, checkout this list

https://github.com/styfle/awesome-desktop-js


I personally liked that I could use whatever I wanted for the backend, but I’m kind of inclined to switch to Tauri anyway since the build story seems a bit better (ultimately I want native desktop builds for every platform).


Whatever their opinions on this project. I'm pretty much like it when start to create a small project, it's very light in terms of memory usage, also the size of the compiled binary is way smaller than electron.


That 100 second video was really very well done and convincing. I shouldn't have watched it on break because now I want to do go home and do something with Tauri :)


The 100 second video length is 2:39, far in excess of 100 seconds. Once I saw that I lost total confidence in the project.


I can't believe I was so bamboozled. Worst blunder in open source history, perhaps?

Jokes aside, it was still a good video!


Shal'kek nem'ron


Jaffa kree!


Indeed


Two “L”s!


In the middle of my backswing!


my pond has no fish


I would honestly prefer flutter instead of relying on system web view and all of its inconsistencies


This is totally different use case, you may prefer GTK or Qt if you know it, tauri is about giving the power to web devs to compete with Qt devs.


What has been stopping them? PWAs have been around for quite some time.


It's just take time and browser feature complete, like photoshop is one web now.


I looked at it, but there is very little ecosystem support for other UIs beyond Material. There are partial Macos/Windows (fluent) libs but everything still seems quite immature. I do think it gets better rapidly though.


https://github.com/tauri-apps/wry

This rocks, especially with some IPC between the "native" things like filesystem + TCP sockets -> JavaScript "bridge".


Name inspired by Stargate?


What is the system webview on Linux, where such a thing doesn't exactly universally exist?


webkitgtk


WebkitGTK is broken in many ways. The only suitable option for Linux is QtWebEngine.


Nonetheless, my answer is correct: Tauri uses webkitgtk on Linux.


A similar project that I'm using is https://wails.io. It uses the native system webview and the backend is in Go. You can cross compile to Windows, Linux, and Mac.


Doesn't the browser native messaging feature already provide the ability to call native applications and create a backend language API? I guess I don't understand the need for every app to basically have its own browser engine, no matter how "lite", when I can already develop apps with Chromium that use native messaging.

I'd rather see a unified solution which pretty much exists then to have a bunch of alternatives that provide no greater benefits overall from what I can tell.


I wonder if they've gotten around the horror of Windows distribution for native webview based apps?

The usual problem is that you have to either use an antiquated IE based webview on Windows or install the Microsoft Edge runtime. The latter is painful to bundle and some people don't like it, especially enterprisey IT departments who consider it "another thing" they have to approve instead of just a part of the app since it's a separate OS component.


> The usual problem is that you have to either use an antiquated IE based webview on Windows or install the Microsoft Edge runtime.

Windows 10/11 both ship with Edge by default, so however big of a problem that is _now_ (probably depends a lot on your target market), it certainly will progressively be a smaller problem over time. Windows 10 was released almost 7 years ago, so while there are undoubtably some corps stuck with windows 8 as their standard, most of the world should've moved on at this point I'd think.


It depends on your target market then. If it's for business/enterprise use you have to ship the entire universe and try to support Windows as far back as possible because companies don't upgrade.


It is these types of platform questions that make Electron so powerful from the developer perspective. In building Beekeeper Studio I already have a lot of OS-specific problems to debug, having to also debug the webview just makes it 100x harder.


Electron is one of those things that's both terrible and awesome at the same time. It's great for developers but it's a RAM hog, a CPU hog, a bandwidth hog (in downloads), and a disk hog.

But don't blame Electron. Blame OS vendors and their refusal to standardize anything when it comes to app distribution.


Sadly mobile support is still far off on the horizon it seems.


It doesn't seem at all "far off on the horizon", it used to seem far off, but seems they have people dedicated to it right now.


I tried to use Tauri for a personal project back in January and it was missing some basic features like windows without a topbar.

Have things matured meaningfully since then?


Are there any good HTML ui component libraries that people are aware of?

Not just styling buttons with CSS, but actual components like e.g. tab-strips?


What you mean tab-strips ? There are toooooooo many good HTML ui components, good I mean beauty, good code quality, maintained by a team, but maybe not good enough for your use case. UI is verrrrrry subjective.

Some link to share

- MacOS & Windows https://github.com/gabrielbull/react-desktop - Ubuntu https://github.com/vivek9patel/vivek9patel.github.io - XP https://botoxparty.github.io/XP.css/

There is no such thing like desktop native components, you have to choose the desktop first, every desktop is different, but there are always someone simulate the ui.


Care to share some links?

I have been unable to find any "desktop-like" components.

There are many many things that just use some CSS styling on native radio buttons or whatever, but very few that offer higher-level functionality like tab-strips where I can pull of a tab and reorder it etc. I.e. more than just styling some divs.


Yes, there is no fully desktop like components, looks like desktop but no desktop. Just like recently the app is not that native look, only flutter give you almost pixel perfect native looking, native is hard, build for the base os needs, not for every one to use.

The good side of using native is less learning more intuitive, but everyone doing there own design system now, users already trained to use newer design pattern.


All these components/frameworks are build for websites, but a desktop application looks different. I haven‘t seen a maintained desktop application ui framework in years.


Quite enjoying https://daisyui.com/ at the moment, and in general any framework built with tailwind CSS that allows styling with tailwind utility classes.


Cmd+F accessibility: 0/0 - both this discussion and their site search. :(

One issue from 2019: "Tracking : accessibility (a11y)" https://github.com/tauri-apps/tauri/issues/207


In an ideal world, the browser could add a desktop or smartphone mode running in a separate process with web surfing(and others like cookies etc) optionally turned off, then it becomes a true universal GUI platform.


It's possible to embed nodejs (or V8 or demo) in a Rust binary. So perhaps we could embed nodejs into the rust backend and just run a nodejs app.


Why does Tauri say "faster" or "blazing fast"? I think it has same limitations as Electron, or did I miss something?


It's faster to start, faster to build, but not faster for pure web, most of time is slower than electron except for windows, because webview2 and electron using the same core. But if you replace some of your app function by bridging to rust, it's blazing fast.


As it is written in rust, I believe this is a legal requirement.


also, don't forget: it is safe.


More like a required dependency.


electron ships with own browser so each app is like running a separate chrome* instance but this a wrapper around systems webview.

i think thats where claim comes from.

edit: embedded lib-chromium thing


Awesome, I've been waiting for a 1.0 release to start playing around (I know its been fairly stable anyway, but still)


Looks great but I can't find any references to how to implement a sidecar with the new documentation



If I get this correctly, Tauri is neither about performance nor size, but about security?


Per their introduction video they advertise it as lightweight as the runtime "only" uses 180MB of memory at startup.

This makes GTK and QT look lightweight in comparison, not to mention FLTK, a 3D enabled, platform independent toolkit, which fits in a statically linkable 300kB library.

Of course, these require C++, and the point of those frameworks is to enable web developers to become application developers. One can't expect resource efficiency when everything has to run on top of a web browser.


Not sure. To me, they seem to nail all three of them.

- The desktop application I build end up being 16M which seems small enough to me.

- The performance is generally good enough, even though I haven't spent any time optimizing things (here is loading 1000 comments from a HN thread https://ditzes.com/item/31742590, even faster if you use the local version [obviously])


Sure but when it's loaded how much memory does it use?


Just as a reference, the application I'm building features a lot things inside the final binary, that might affect ram usage, so this is not a "hello-world" example but a real application, with a SPA built-into the binary and loaded into RAM, together with a HTTP API and more (fuller list here: https://news.ycombinator.com/item?id=31765186).

With that said, `ps_mem` (https://github.com/pixelb/ps_mem) reports that the memory usage is 58.7 MiB after starting the Tauri application. If I run just the HTTP API, memory usage ends up being 19.4 MiB. So I guess in that sense, the overhead of Tauri is about ~39.3 MiB.

For my use case, that's pretty acceptable.

Edit: full data in case it interests people:

Desktop application:

    Private  +   Shared  =  RAM used       Program
    
    47.0 MiB +  11.7 MiB =  58.7 MiB       ditzes
Just the API:

    Private  +   Shared  =  RAM used       Program
    
    19.0 MiB + 345.5 KiB =  19.4 MiB       api


Is this a substitute for Flutter? (After mobile support ships)


I think it could compete against web widgets based apps, but I'd say Flutter better targets the mobile stuff with their canvas based rendering.


For Electron, I think.


I had a look at the tauri site a few weeks ago but could not find a single screenshot or demo app to see what it looked like.

It would be good to see what it actually looks like before investing in time to build something.


You write your own JS/HTML/CSS to style it, however you want. I'm currently using ClojureScript to write my Tauri applications, but that has less to do with styling.


Agree screenshots are good, but it looks like a normal desktop window with js running inside.


Does anyone else find that the text-to-speech on the "Tauri in 100 Seconds" video sounds very unnatural?

Tauri seems like a step in the right direction so will be giving it a go.


It's not text-to-speech, it's the video (and voice) of a Youtuber (Fireship) that makes a lot of "in 100 Seconds" videos about all kinds of frameworks/programming languages/etc.


I find it surprisingly hard to judge, because the edit style is so obnoxious and poorly executed. I think it’s done by a human, but the speech and editing are both sufficiently lousy that I’m not confident from this video alone—though another couple of videos I tried were definitely somewhat better. The aggressive cutting style is just bad editing, and the speaker has spoken each phrase independently with no attempt to bridge them (which a competent speaker would do). The first ten seconds are particularly grating, with thoroughly unnatural emphasis on the start of most syllables, almost as though each word or even syllable had been spoken independently and then glued together (e.g. And, A, Light, Weight, Rust, Back, End). The prosody is also regularly quite a bit off, and it’s hard to determine if that’s related to the bad editing and speech segmentation, or an independent issue. There’s enough that feels natural in things like intonation that I don’t think it’s TTS, but it’s also making a lot of the sorts of errors that even the best TTS engines habitually make.

I get the impression that it’s a human who doesn’t know how to speak or edit particularly well but normally gets away with it not being too bad (as I say, other videos seem to be better, though they still suffer from the aggressive cut style), but compromised harshly on quality in this case in order to squish more into the hundred seconds… and still ended up 50% over time.

I very strongly dislike the general style.


Different strokes. I love Jeff's style and video pacing, though I don't think this is one of his best.


I guess that happens when you try to fit everything in 100 seconds.

Also, it will become almost literally impossible to hear the difference in the near future, so I personally wouldn't keep assuming it's one or the other.

Also also, did you give this feedback to Jeff?


> I guess that happens when you try to fit everything in 100 seconds.

What, you overshoot by 50%? :-) But more seriously, the job that has been done is simply low-quality, even disregarding the choppy edit style—probably a mixture of shoddy work (from comparing it with some of the others), and the creator not being capable of better as regards the speech—most aren’t particularly aware of how to improve. Much better is readily possible.

> Also, it will become almost literally impossible to hear the difference in the near future

I am an excellent reader, highly regarded for my diction and prosody and for conveying the sense of a matter. So far, I haven’t heard a TTS demo, hand-picked or otherwise, that would stand a chance against a skilled reader: the veriest dunce would savvy which was which within a couple of sentences. (And at least a couple of the demos were deliberately trying to address these sorts of shortcomings in inflection and such.) Certainly they’ve reached the stage where you often can’t reliably identify the computer versus the mediocre reader (and there are an awful lot of them), but I don’t think we’ll see computers beating skilled readers and speakers any time soon, when I consider how poor a job AI is still doing on coherent longform writing, and then add the degrees of nuance and information conveyed in speech. (Supplant them? Sure. But you don’t have to be better than something to supplant it, just cheaper, or some such thing. My favourite example of this is book binding where hot melt glue is vastly inferior to cold glue, but it’s much faster and thus cheaper to produce with, and it’s good enough that you’ll struggle to find cold glue ever used in production now.)


I guess it's been processed to remove gaps which makes it sound unnatural and to me as well as GP I guess, antagonizing.


Surely that's not a human voice?!


Like a lot of newer video content creators, this author has perfected their ability to speak exactly like a speech to text synth does: The same inflection over sentences, no human variability between lines, a lot of post-processing.


What would drive this? I've noticed more videos like this recently and it has an uncanny valley effect that makes me shut if off almost immediately.


Maybe tiktok TTS is now the standard for vocal communication :( . If I ever hear "the young people" talking like this to each other when I'm out shopping I think I will retire and just move off the grid.


That should be a sub genre of popping and locking dance competition, also sound like a TTS.

The AGIs should be concerned about us, not the other way around.


I am the same way, but I've noticed folks 10-15 years younger than me don't mind it at all. Perhaps it's just some weird internet culture thing that I'm too crusty to understand :)


I literally closed the tab after about 8 seconds of it. It's unbearable.


lol, Jeff (the video creator and narrator) will probably take this as a compliment.


The introduction being a video, and only a video, is already a major annoyance. I don't suppose the text is available for reading somewhere?


Is there something similar for C++.


It still uses node.js, right? Since it is new and for the future, why not choosing deno?


If it's for the future, why not use something even newer than Deno, because clearly newer === better?

But on a more serious note, what could they possibly stand to gain to use Deno instead of NodeJS at this point? The languages are mostly the same, the tooling slightly different. Sounds like it'd add a lot of changes just for the sake of changing things. Not to mention newer stuff usually are less tested and higher chance of not working.

Speaking about newer, has Deno received any sort of security audits? Tauri is pretty focused on security, so one could assume that'd be a requirement before even considering Deno.


Deno does not use NPM, so there are huge gains to be made in that regard.


That seems like a huge loss in terms of productivity. In what way is that a gain?


It looks like as of a couple of years ago Deno is something the Tauri team was experimenting with: https://dev.to/tauri/use-deno-to-build-a-tauri-app-1f7h

My guess is that there's only so much change you can foist on people at once. If the point of Tauri is that JavaScript devs can leverage their existing knowledge and skills then meeting them where they (or most of them) are seems like a reasonable strategy.


According to https://github.com/tauri-apps/tauri they are using "Node.js for running the CLI (deno and pure rust are on the roadmap)"


Which you don't even have to use. I don't. I just use `cargo build` and `cargo build --release` which works exactly the same way as the CLI. Add `entr` and you get the "live-reload" feature for free too.


No, doesn't seem like it. You can optionally bundle nodejs, but it's not required.


It would be really nice if they had their own app store or package manager.


How so? What could they potentially gain by having their own app store or package manager that they don't gain by just leveraging the existing ones?


Being Rust means that OSS desktop apps can just use Cargo to install, potentially making every app user also a Rust developer.


Thank you for your silly comment, which I remember again why I don't like this place. I hope you get out of puberty as soon as possible.


Excuse me? If you're unable to clarify your thoughts enough so others can understand what you mean and why you say what you say, you need to take a step back.

I do really want to understand the "why", I'm not being sarcastic or anything.


I like it,but even a trivial app becomes a huge +5GB folder in development. The dependencies folder alone will make a node project blush + all the stuff generated when compiling/building. I love to have several apps to work on them concurrently but I wont reserve 50 Gb of my already small SSD for this stuff.


5 clocks later too check if it’s also webviews. It is, so I stopped reading


This is 'powered by Rust' the same way my gas car with electric windows is 'powered by electricity'


Not exactly - Rust is a first class supported language. Iow, you can write your app in Rust and just use HTML/JS/CSS for the view.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: