6 ms·
Tauri – Creating Tiny Desktop Apps With React/Vue
- andrew_ 4y agoSvelte 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/templates/plugin/with-api/examples/svelte-app https://github.com/tauri-apps/tauri/blob/dev/tooling/cli/tem...
- devmor 4y agoI'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.
- Szpadel 4y ago> 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)
- jbverschoor 4y agoNot so 'tiny' when they're using webviews
- jakelazaroff 4y agoTauri uses the operating system's web view, so it's significantly smaller than Electron's "ship a whole copy of Chromium" approach.
- chii 4y agobut 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.
- musicale 4y agoImagine being able to run ten 1.6GB Electron apps in only 16GB of RAM - it's super efficient!
- fluidcruft 4y agoWouldn't a web app have to deal with running in the various browsers anyway?
- chii 4y agoyes, 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?
- iainmerrick 4y agoThe packaged app can work with the local file system, and call additional native APIs that aren’t available in a browser context.
- devmor 4y agoThe 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.
- jakelazaroff 4y agoAs 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.
- atlas_hugged 4y agoEven 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.
- yobert 4y agoI can't believe they didn't make their logo something like ⧊ :)
- slyall 4y agoPreviously: https://news.ycombinator.com/item?id=31764015 https://news.ycombinator.com/item?id=31764015 ( 238 comments, 2 months ago ) https://news.ycombinator.com/item?id=29807022 https://news.ycombinator.com/item?id=29807022 ( 419 comments, 7 months ago ) https://news.ycombinator.com/item?id=26194990 https://news.ycombinator.com/item?id=26194990 ( 417 comments, 1 year ago )
- dang 4y agoThanks! Macroexpanded: Tauri 1.0 – Electron Alternative Powered by Rust - https://news.ycombinator.com/item?id=31764015 https://news.ycombinator.com/item?id=31764015 - June 2022 (238 comments) Tauri – Electron alternative written in Rust - https://news.ycombinator.com/item?id=29807022 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 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 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 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 https://news.ycombinator.com/item?id=23769424 - July 2020 (116 comments)
- cercatrova 4y agoI 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 https://news.ycombinator.com/user?id=raphlinus [1] https://news.ycombinator.com/item?id=31297653 https://news.ycombinator.com/item?id=31297653 [2] https://news.ycombinator.com/item?id=32112846 https://news.ycombinator.com/item?id=32112846
- iainmerrick 4y agoThe “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.
- cercatrova 4y agoI'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.
- iainmerrick 4y agoI didn’t know that about Flutter! What’s a good example of a desktop app built using their framework?
- collegeburner 4y agolowkey hoping to use this for a upcoming project, anybody know when they finishing mobile?
- a5huynh 4y agoIn 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/ https://yew.rs/ [1] https://github.com/seed-rs/seed https://github.com/seed-rs/seed [2] https://github.com/a5huynh/spyglass https://github.com/a5huynh/spyglass - Create your own personal search engine by crawling & indexing files/docs/websites that you want.
- graboid 4y agoI 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/ https://preactjs.com/ [1] https://github.com/developit/htm https://github.com/developit/htm