12 ms·
Tauri: Rust-based Electron alternative releases beta
- nim2020 5y agoHey - I am nothingismagick aka Denjell, one of the founders of Tauri, and will do my best to answer your questions about the project, rust, wasm, etc. https://github.com/tauri-apps/tauri https://github.com/tauri-apps/tauri
- amelius 5y agoDoes the project contain C++ code?
- cultofmetatron 5y agov8 is c++ and by their own page, they use node whihch embeds c++ so I'd say yes
- nim2020 5y agono, not directly. all primary code is written in rust
- iudqnolq 5y agoThey use whatever is the system WebView on the platform you run the code on. On Windows that's the Edge engine, on MacOS it's Safari's engine, etc. Those are all some combination of C and C++. See https://github.com/tauri-apps/wry https://github.com/tauri-apps/wry Edit: s/IE or Edge/Edge
- wffurr 5y agoThat seems to eliminate one of main advantages of electron, the consistent runtime environment. If your html/css/is has to work correctly in EdgeHTML, Safari Webview, and Blink, you are limited to the lowest common denominator features. Electron with Chromium has the largest feature set out of all of those.
- knubie 5y agoI can’t speak for other developers but my app runs on electron and the web (because why not?), so I need to make sure my app works with those browsers as well. A lot of the big electron apps I’m aware of are the same (slack, notion, discord, etc).
- iudqnolq 5y agoSlack used to use a similar approach but gave up in part because platform webviews are more outdated than browsers on average.
- derefr 5y agoElectron has two "sides" to it — a renderer process, and a NodeJS process, that communicate over IPC (where as far as the renderer is concerned, the NodeJS process is kind of like a very intrusive browser extension.) AFAIK, if you're writing a greenfield Electron app, it's best to do as little as possible in the renderer side, and as much as possible in the Node.js side, because the Node.js side has things like native threads and mmap(2), and everything running within the Node.js process can share that state, but things on the renderer side have to use it through RPC. I would assume that this project is similar, but with arbitrary Rust code in place of Node.js (is that right?) In that case, it doesn't matter how featureful the renderer is, as you're just using it as a GUI framework with a declarative view-model format. Just like a XAML or QML, but it's HTML+CSS. As such, idiomatically, you won't be using fancy browser APIs like threads or WebRTC within the renderer; instead, you'll be using native code on the "app side" and then passing the renderer data. The features of Tauri itself are "whatever native libraries you want to bring into your Rust binary." (Plus whatever conveniences it already builds in, of course.)
- tommoor 5y agoPlease add an example app with bundles for each platform – a calculator, todo list, or something similarly simple?
- nim2020 5y agoyeah, we just plain forgot to put that back on the landing page. mea culpa https://github.com/tauri-apps/tauri/tree/dev/examples/api https://github.com/tauri-apps/tauri/tree/dev/examples/api
- oldgradstudent 5y agoCan I integrate Tauri into an existing Windows application? Specifically: 1. Can I place it into a native window handle (e.g. HWND on Windows)? 2. Can I create a new window, but use the parent application's event loop without modification? Thanks
- juancampa 5y agoInteresting that you guys list "No Rust Skills Required" as a Pro instead of a Con. As a Rust programmer I'd prefer "No JS Required"
- Waterluvian 5y ago? Are you asking for them to make an entirely different product?
- whatshisface 5y agoIt's off-topic, but it would be nice for someone to make a really good GUI toolkit for Rust. Something that integrates with system APIs for copy-paste and stuff like that.
- Waterluvian 5y agoThere's a few decent ones but like a lot of Rust stuff, they're young. I hear you though. It's, IMO, a core tool missing from my Rust toolbelt.
- juancampa 5y agoThe most promising one is makepad.dev IMO. It works on Mac/Windows/WebGL afaik
- juancampa 5y agoI see how the second part of my comment seemed like I'm asking for "Rust in the front-end", that was not my intention. My main point stands though, requiring Rust is not necessarily a "Con", it's in the "Pros" list for many people
- silon42 5y agoI would also expect/like that: HTML/CSS + Rust (no JS/GC). And running out-of-process. Add XUL as a bonus.
- 5y ago
- adambatkin 5y agoWhy Node and not Dino?
- nklayman 5y agoAssuming you meant Deno, we used Node for the CLI because most web devs already have npm installed. We want the getting started process to be as simple as possible. Our Node CLI is just a wrapper really, as nearly all of the commands are actually implemented in Rust. You don't even need Node to build a Tauri app anymore. Node is not including in a shipped Tauri app, although we plan on supporting both Node and Deno as optional replacements for Rust in the future.
- vijaybritto 5y agois it possible to include wasm in Tauri apps?
- nklayman 5y agoYeah, you can use wasm on all platforms.
- vijaybritto 5y agoDoes it try to achieve feature parity with Electron?
- bmn__ 5y agoNo question, just a small commendation. It pleases me that you acted appropriately to the criticism about Tauri not being native and removed this previously advertised claim.
- pkos98 5y agoA step towards the right direction, I am curious how it performs in relation to Ultralight[0]! [0]: https://github.com/ultralight-ux/Ultralight https://github.com/ultralight-ux/Ultralight
- nim2020 5y agoTauri distributables are still 10 times smaller than Ultralight. Regarding performance will have to do some reviews.
- cultofmetatron 5y agofrom the homepage https://tauri.studio/en/docs/about/intro https://tauri.studio/en/docs/about/intro The core is built with Rust and the CLI leverages Node.js maybe make this text a bit more explicit? I'm guessing maybe you're using a message passing layer to keep the processes separate?
- nim2020 5y agothat's a great idea.
- the_duke 5y agoTauri just uses the platform native webview, it's not a rendering engine. I'm a bit surprised the new website doesn't mention this at all. The Github repo does.
- marsven_422 5y agoUltralight is not MIT and it uses Jenkins...
- arodyginc 5y agoShould you bundle it with Deno, not Node, as Deno is also a rust project?
- nim2020 5y agoWe don't bundle with node. We bundle with rust.
- arodyginc 5y agoIs it a misleading title then? I thought you did an alternative to Electron
- ibraheemdev 5y agoBeing an Electron alternative and using Node.js as an optional bundler are not mutually exclusive.
- arodyginc 5y agoWell, I'm lost. You won
- quitethelogic 5y agoLike Electron, with Tauri you write your GUIs with HTML, CSS, and Javascript. Electron uses Node for the client-side non-GUI functionality, while Tauri instead uses Rust binaries to accomplish same. That's the alternative part. Node is not needed at all in the final build, although it may be used to create your app before bundling for release.
- nim2020 5y agoMaybe we need to be more clear about how nodejs CAN be used in the construction of a Tauri app, and that it is neither a requirement to make a Tauri app nor a component that is shipped with a Tauri app.
- 5y ago
- nim2020 5y agoIf you want to read more about what is new in the Beta release, we also published an article over at dev.to https://dev.to/tauri/announcing-tauri-beta-more-efficient-crossplatform-apps-with-better-features-1nbd https://dev.to/tauri/announcing-tauri-beta-more-efficient-cr...
- nsonha 5y agoI don't get the push for rust as a front-end language, it's very distracting with a lot of low-level features. Can we just stick with "best tool for the job"? Rust for performance-critical systems and, say, typescript for front-end? Using a single language for everything is a wet dream that always ends up in complexity and more work as you're fighting the "native" ecosystem.
- VWWHFSfQ 5y agowhat if I don't like typescript
- nim2020 5y agoyou can write your frontend in whatever you want, for example using yew...
- twobitshifter 5y agoDon’t use a web based app stack?
- nsonha 5y agoI don't know, pick a better high level language: kotlin, swift, f#
- deleted 5y ago[deleted]
- whimsicalism 5y agoMaybe you should spend like 5 minutes looking into the thing you're critiquing before critiquing it? Just a suggestion, given that Tauri literally uses typescript for front-end.
- nsonha 5y agodid spend 5 mins, saw absolutely no code so I made some assumption. Maybe they should make better docs that don't require 5 mins+ to figure that out.
- Aeolun 5y agoI’ve seen this before, and I still have no idea what it does. If it’s an electron alternative, is it too much to ask to show an image of a webapp running on a desktop (preverably a variation of every OS) front and center on the landing page? I’d like to see it working immediately, without needing to watch any videos.
- nsonha 5y agohave some appreciation to his fashion and fireplace
- nim2020 5y agoThat's a great idea! We do have a revamp of the landing page ahead of us, now that our roadmap is almost completed.
- twobitshifter 5y agoAs far as I can tell, they have reimplemented the electron api in Rust to make use of native web views removing the chromium dependency. I agree it’s confusing and not clear on the homepage or from the hacker news title. I was expecting something like an electron framework using servo.
- buu700 5y agoI would be much more interested in a Gecko/Servo alternative to Electron than a native webview alternative. Not that I don't also acknowledge the need for that, but my application is dramatically faster in Firefox than Chrome, yet we're stuck packaging a suboptimal experience in the desktop app because Chromium is our only option.
- nim2020 5y agoWe are going to put our demo app (that showcases the API) front and center on the landing page. Thanks for the input https://github.com/tauri-apps/tauri/tree/dev/examples/api https://github.com/tauri-apps/tauri/tree/dev/examples/api
- politician 5y agoIs anyone developing a cross-platform alternative to native OS webviews? The web hasn't been heading in a good direction lately.
- oscargrouch 5y agoI'm doing this. One difference is to be able to ditch Javascript and use a native language(Swift is the first one) to talk directly to webkit. The other difference is that the apps are "managed" as Chrome manages the renderer process, so in the end you have one manager process and one service process for each app and many process for the UI apps. The problem with Electron is that for each app, it will need many processes, and if you have more than one Electron app running, it will eat all the resources. With the architecture proposed, it will be more light as there will be just one instance of the manager processes, and unlike Electron they would not be isolated as they are all centrally managed, also the fact that it wont need to use JS, will also put less pressure on memory resources. It also uses RPC so that every app have a API that can be callable by others. This in turn can make it form a "network of apps" where the applications can consume the apis of the other apps installed. The RPC service is local first, but can fetch things in the "cloud" if the application needs to. For me this is my take on what "Web 3.0" should look like. I have a 0.1 version here and i'm just finishing the final touches before launching it.. Edit: Also i forgot to mention that the distribution of the application and resources(database and files) is over torrent with DHT routing, so you can share a unique address and serve your own applications over internet without depending on domains or a third-party hosting it for you.
- politician 5y agoNice! If I understand correctly, the renderer process is shared across all apps, each app is either a service or a UI process, and all of the apps export an API that's routable from the local machine. Is that right? Do you need / want any help?
- oscargrouch 5y agoIts like this: You have one manager process and one GPU process for everyone. (Mind you that this is chrome based, but its quite modified i must say). Then for each application: You have a "service process" which is instantiated and is always running, this process asks for the manager to create its rpc service server. Then every rpc call is routed to it. This application service process is already coded by the developer so he defines what every api does and also how it respond to resources like pages, images, videos, etc.. (it also uses RPC by default to route resources.. but its through HTTP/2 giving its gRPC/Protobuf) This process, totally in control of the dev code also can hijack its own application launches, so its in charge of app launching and killing (from its own scope) Then theres the UI process which is akin to renderer and its also coded by the dev, where the renderer is in Swift so totally customizable (Imagine being able to control the C++ renderer events, lifetime, frames, etc.. of the chrome renderer process; in this case you do, with Swift), giving you have a lot of power. The developer control, codes and ship the service and the ui app. Once its installed, even without any UI, all other applications can consume its services over its RPC api, because there is a 'service process' running and serving those requests (imagine being able to deal with twitter or a google search api (all local and with the same tech) from your app that is specialized in something else) > Do you need / want any help? Yes of course! How can i reach you?
- andrewmcwatters 5y agoI don't care about your YouTube videos, I don't care about your governance, I don't care about your book, tell me what it is in non-marketing speak and show me a screenshot on the front page and shut up about everything else. Tell me what it is, show me what it looks like, provide a "Hello, World!" API example for opening a window on the front page. Stop contributing to landing pages that jerk the consumer around.
- deleted 5y ago[deleted]
- ahmedfromtunis 5y agoThere's this silly game a play sometimes: I go to producthunt.com, open a bunch of links and, then, try to guess what each of them does. I fail most of the time.
- rvz 5y ago> Tell me what it is, show me what it looks like, provide a "Hello, World!" API example for opening a window on the front page. Stop contributing to landing pages that jerk the consumer around. They've got a point. Time to cut through the hype, get straight to the point and show some screenshots to catch their eyes. If you can't manage that, the tab gets closed with in 5 seconds. Even if it has the Rust buzzword. (Because that trick always works on HN)
- whatshisface 5y agoI dug around, and the only screenshots I can find are on a few project pages that use it. But of course, there is not much to see, it's just a window with a web view inside of it. https://guijs.dev/ https://guijs.dev/ https://github.com/samirdjelal/bidirectional/ https://github.com/samirdjelal/bidirectional/ https://github.com/mmpneo/simple-obs-stt https://github.com/mmpneo/simple-obs-stt
- Philip-J-Fry 5y agoWow you're right. I thought you were exaggerating a bit because there's a "Get started" button right there. But even clicking that I had to drill down through multiple badly named pages just to find the part that describes how the Rust portion of this works. Why is the selling point of this not shoved in your face from the second you load the page.
- fabiospampinato 5y agoAs a developer of an Electron app to me a competing framework that doesn't bundle its own rendering engine doesn't make sense, why would I want to trade control over how my app is rendered for ~100MB of disk space? I might as well just ship a website at that point, almost everything that makes Electron appealing comes from shipping your own rendering engine.
- VWWHFSfQ 5y agoyou can't ship your own rendering engine on ios > why would I want to trade control over how my app is render for ~100MB of disk space? it depends how much you respect your users
- nerdponx 5y ago100 MB on disk is less than 0.1% of a typical consumer SSD. Memory and processor usage is the concern.
- fabiospampinato 5y ago> you can't ship your own rendering engine on ios That's irrelevant, just because I can't do some things on iOS doesn't mean that I shouldn't do them under desktop OS' too. Just one example: file system watching, if I need to do that with Electron I'll just use `chokidar` and have it working in no time, plus I can share whatever frontend code with the backend too, good luck doing the same with Tauri (given the current state of things anyway). > it depends how much you respect your users I don't know what kind of users you've got but mine care about me iterating quickly on the app, care about having new features, care about having a faster app. Most of them would consider trading any of that for ~100MB of disk space stupid. As I said, if disk space is all you care about you might as well just ship a website.
- Jweb_Guru 5y agoOrder of magnitude memory reduction, not disk space, was the selling point last time I heard. And given how often I hear users complaining about memory consumption in Electron apps, I think that is something pretty attractive, if it pans out.
- dfabulich 5y agoI'm really struck by the differences between Electron's website and Tauri's website. https://www.electronjs.org/ https://www.electronjs.org/ https://tauri.studio/ https://tauri.studio/ Tauri's website is way, way worse. Tauri uses unnecessary jargon where Electron's site uses simple, more direct language. Electron: > Build cross-platform desktop apps with JavaScript, HTML, and CSS Tauri: > Build smaller, faster, and more secure desktop applications with a web frontend "web frontend" vs. "JavaScript, HTML, and CSS" Electron and Tauri have icons with labels. Electron: > Web technologies, Open Source, Cross Platform > Automatic updates, Native menus & notifications, Crash reporting, Debugging & profiling, Windows installers Tauri says: > Brownfield, FLOSS, Bundle > Security, Patterns, Cross-platform https://tauri.studio/en/docs/about/intro https://tauri.studio/en/docs/about/intro > Tauri is a toolkit that helps developers make applications for the major desktop platforms - using virtually any frontend framework in existence. The core is built with Rust and the CLI leverages Node.js making Tauri a genuinely polyglot approach to creating and maintaining great apps. Electron doesn't have an equivalent "about" page, but instead has this paragraph on its home page: > It's easier than you think: If you can build a website, you can build a desktop app. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It takes care of the hard parts so you can focus on the core of your application. "virtually any frontend framework" "polyglot" vs. "takes care of the hard parts"
- jackson1442 5y agoExactly my thoughts. I feel like Tauri is trying to let Rust carry the project instead of writing decent marketing materials. Really the only thing I see on Tauri's site that makes me want to use it is Rust, while I can see many value props on Electron's site.
- cyanydeez 5y agotauri saves space by not packaging a browser. this means your app has hundreds of javascript versions to target
- ironmagma 5y agoThey don't say "JavaScript, HTML, and CSS" because it isn't just JavaScript, HTML, and CSS. It's any technology that can run in the browser, such as Yew or Maple for example. Arguably those Rust-based frontend libraries are the main focus, even, over something like React. FLOSS also means a different thing from Open Source because of the "Libre" aspect. I don't see why being different is considered bad here, as its whole shtick is that it's an alternative.
- stdgy 5y agoSo what are the benefits to using Tauri over Electron? Are app sizes smaller? Is the memory footprint smaller?
- aitchnyu 5y agoWill FOSS and uh... indiscriminate distros face hurdles to bundling this? If this is good with interacting with CLI, Linux distros could experience a Cambrian explosion of GUIs. Ubuntu's flutter installer project could get leapfrogged.
- parker-codes 5y agoPlease keep in mind that this project just reached _beta_. We are working to implement valuable feedback from the community, so please don't expect things like the landing page to be as polished as an 8 year old project. Shout out to all of the hardworking people behind Tauri. ♥
- geodel 5y ago> so please don't expect things like the landing page to be as polished as an 8 year old project. I think problem is that it is over polished and slick not unpolished.
- bastawhiz 5y agoI've been clicking around in the docs for a few minutes now and I still haven't figured out how to do anything beyond install it. What am I missing?
- dang 5y agoTauri: An Electron alternative written in Rust - https://news.ycombinator.com/item?id=26194990 https://news.ycombinator.com/item?id=26194990 - Feb 2021 (417 comments)