News for hackers. Stuff that matters.
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by cercatrova on Saturday August 13, 2022 @12:34AM (#32446931)
I like Tauri and the fact that it's written in Rust, but I do wonder just how tiny these apps are when it's still using webviews, even if they're system webviews and not Chrome instances like Electron. I would have liked to see something more akin to a native rendering framework like Flutter (native as in bare metal, non webviews, not native as in native OS elements).

However, it does seem quite hard to do if there's not a dedicated team just for developing such a GUI framework. raphlinus [0] has some great knowledge about this that I've read from his blog posts, such as his most recent one, Advice for the next dozen Rust GUIs [2]. In my opinion, the Flutter-like approach is the way to go if you want to get good performance without webviews, have a consistent user experience across platforms, and be able to write once and deploy everywhere.

[0] https://news.ycombinator.com/user?id=raphlinus

[1] https://news.ycombinator.com/item?id=31297653

[2] https://news.ycombinator.com/item?id=32112846

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by iainmerrick on Saturday August 13, 2022 @12:51AM (#32447021)
The “bare metal” approach (which in practice would be something like GL, right?) is good for games, but is it good for apps?

Ideally you want something that uses the host’s UI conventions, works correctly with keyboard shortcuts, uses accessibility APIs, can drag-and-drop with other apps, etc. Using a DOM UI will get you a lot of that without too much effort. Using a WebGL UI won’t.

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by cercatrova on Saturday August 13, 2022 @12:56AM (#32447046)
I'd say it is good for apps, as long as the framework developer also adds those things you mentioned into the framework. Flutter currently has decent shortcuts and accessibility. Of course, if they don't add these in, then yes it will be worse than a DOM UI, if only because the DOM has been engineered over the past few decades to add these features in natively.
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by iainmerrick on Saturday August 13, 2022 @04:49AM (#32448046)
I didn’t know that about Flutter! What’s a good example of a desktop app built using their framework?
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by PhantomBKB on Saturday August 13, 2022 @01:32AM (#32447200)
I also like flutter compared to one of these webview solutions. There are good alternatives in other languages like Go (https://gioui.org/)
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by pvinis on Saturday August 13, 2022 @01:45AM (#32447245)
there must be a react renderer for flutter, right? or someone should make it!
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by devmor on Friday August 12, 2022 @11:46PM (#32446712)
I've ported a couple of small to medium sized electron apps to Tauri with moderate success.

The documentation is still a bit lacking, otherwise I think it'd have gone much easier.

On the positive side, their memory footprint has indeed decreased by hundreds of MB, in one case from 1.6GB average down to 72MB average.

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by Szpadel on Saturday August 13, 2022 @02:00AM (#32447319)
> from 1.6GB average down to 72MB average. Thanks, that the exact metric about "tiny" that i was looking for. if that's the general ballpark that we can expect then it looks promising. i wonder how it's scaling with bigger applications (like slack)
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by graboid on Saturday August 13, 2022 @03:48AM (#32447774)
I am using Tauri + Preact [0] for a private project. It's wonderful. With Preact + htm [1], I can have a really complex UI, that still feels snappy, without having to deal with webpack or any other build pipeline (after all, it is a hobby project and therefore should spark joy).

The backend is entirely written in Rust.

I did some electron apps before, and I have to say, Tauri really feels snappier.

[0] https://preactjs.com/

[1] https://github.com/developit/htm

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by andrew_ on Friday August 12, 2022 @11:17PM (#32446590)
Svelte was a curious omission, given its excellent performance and simplicity.

Edit:

Ah, Svelte is supported, just omitted from the HN title: https://github.com/tauri-apps/tauri/blob/dev/tooling/cli/tem...

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by slyall on Saturday August 13, 2022 @12:24AM (#32446884)
Previously:

https://news.ycombinator.com/item?id=31764015 ( 238 comments, 2 months ago )

https://news.ycombinator.com/item?id=29807022 ( 419 comments, 7 months ago )

https://news.ycombinator.com/item?id=26194990 ( 417 comments, 1 year ago )

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by dang on Saturday August 13, 2022 @01:01AM (#32447071)
Thanks! Macroexpanded:

Tauri 1.0 – Electron Alternative Powered by Rust - https://news.ycombinator.com/item?id=31764015 - June 2022 (238 comments)

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

Tauri: Rust-based Electron alternative releases beta - https://news.ycombinator.com/item?id=27155831 - May 2021 (168 comments)

Tauri: An Electron alternative written in Rust - https://news.ycombinator.com/item?id=26194990 - Feb 2021 (417 comments)

Creating Tiny Desktop Apps with Tauri and Vue.js - https://news.ycombinator.com/item?id=23862634 - July 2020 (2 comments)

Tauri – toolchain for building secure native apps that have tiny binaries - https://news.ycombinator.com/item?id=23769424 - July 2020 (116 comments)

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by yobert on Saturday August 13, 2022 @12:18AM (#32446856)
I can't believe they didn't make their logo something like ⧊ :)
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by a5huynh on Saturday August 13, 2022 @01:06AM (#32447096)
In addition to React/Vue, you have the ability to use Rust client-side frameworks such as Yew[0] or seed[1] for a truly full-stack Rust experience. I've been using Tauri + Yew to build an cross-platform app (shameless plug: [2]) and it's been a pleasure. There are some rough edges, but most of those have been due to platform specific issues (notifications, Windows vs Unix paths, etc.) and not Tauri/Yew itself.

[0] https://yew.rs/

[1] https://github.com/seed-rs/seed

[2] https://github.com/a5huynh/spyglass - Create your own personal search engine by crawling & indexing files/docs/websites that you want.

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by jbverschoor on Friday August 12, 2022 @11:57PM (#32446765)
Not so 'tiny' when they're using webviews
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by atlas_hugged on Saturday August 13, 2022 @12:17AM (#32446855)
Even accounting for the webview (on windows at least) it’s still a really substantial improvement. I only did a toy test so I have to do something more substantial, but I’m impressed enough to try it out on something a little bigger.
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by jakelazaroff on Saturday August 13, 2022 @12:11AM (#32446818)
Tauri uses the operating system's web view, so it's significantly smaller than Electron's "ship a whole copy of Chromium" approach.
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by chii on Saturday August 13, 2022 @12:16AM (#32446848)
but then you have to contend with the various potential different webviews from different OS'es.

The weight of an app is more than just the size on disk, which tbh, is insignificant in today's harddrive. What's a couple hundred extra megs?

The advantage of shipping your own browser is the control, and thus, reduction in having to support multiple different webviews and the bugfixing associated with that.

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by jakelazaroff on Saturday August 13, 2022 @01:01AM (#32447070)
As someone who cut their teeth on web development when we still had to deal with IE6, I just don't think this is a problem. I can probably count on one hand the number of times I've had to fix major inconsistencies between browsers over the past few years.
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by musicale on Saturday August 13, 2022 @12:24AM (#32446885)
Imagine being able to run ten 1.6GB Electron apps in only 16GB of RAM - it's super efficient!
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by fluidcruft on Saturday August 13, 2022 @12:26AM (#32446894)
Wouldn't a web app have to deal with running in the various browsers anyway?
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by chii on Saturday August 13, 2022 @12:28AM (#32446902)
yes, a web based app would have to contend with the same issue. So what's the advantage of shipping a packaged app that also have the same problem, when shipping it as an electron app would solve this directly and easily?
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by iainmerrick on Saturday August 13, 2022 @12:40AM (#32446960)
The packaged app can work with the local file system, and call additional native APIs that aren’t available in a browser context.
Re:Tauri – Creating Tiny Desktop Apps With React/Vue by devmor on Saturday August 13, 2022 @12:53AM (#32447031)
The main advantage is that the Tauri app runs its non-render contexts in Rust, on the metal, rather than in the javascript vm.

The secondary advantage is that you don't have to update and ship a new binary every time Chromium updates.

Re:Tauri – Creating Tiny Desktop Apps With React/Vue by collegeburner on Saturday August 13, 2022 @12:53AM (#32447030)
lowkey hoping to use this for a upcoming project, anybody know when they finishing mobile?