[HN Gopher] Tauri 2.0 Release Candidate
       ___________________________________________________________________
        
       Tauri 2.0 Release Candidate
        
       Author : martpie
       Score  : 126 points
       Date   : 2024-08-02 19:44 UTC (3 hours ago)
        
 (HTM) web link (v2.tauri.app)
 (TXT) w3m dump (v2.tauri.app)
        
       | kayson wrote:
       | I've been following tauri for a bit. It seems very cool and
       | interesting but I've always wondered - what are the use cases for
       | putting your app in a webview instead of using the browser?
       | Everything I've thought of would work just as well.
        
         | lwhsiao wrote:
         | Is it not lighter weight?
        
           | IshKebab wrote:
           | Not lighter weight than a website because it _is_ a website.
           | The only advantages are you can ship parts of your app as
           | native code, and you aren 't constrained by the browser
           | permission model.
        
             | FFFXXX wrote:
             | One interesting usecase is that you can run a tauri app
             | without any webview windows just as a system tray icon and
             | only spawn a webview window when necessary.
             | 
             | This kind of makes it way more lightweight but only in some
             | situations (obv. heavily depending on the functionality of
             | the app).
        
               | runevault wrote:
               | Would this be for a service style app that happens to
               | have a UI when you need to configure it? If so that's
               | an... interesting idea, but considering the UI is less
               | important I'd probably mind it less (as someone who is
               | not a fan of Electron apps).
        
         | pdpi wrote:
         | The goal is to make a standalone desktop app with access to
         | local resources, so the question is "why should you put your
         | app in a webview instead of Electron or a native toolkit?"
         | 
         | The answer is that Electron forces you to carry a whole Chrome
         | installation around, which is unnecessarily heavy, and (AIUI)
         | you have a node.js backend giving you the means to touch the
         | actual OS, whereas Tauri lets you write Rust (YMMV as to
         | whether that's an advantage). Both Tauri and Electron let you
         | use a web-based interface instead of mucking about with native
         | widgets, which are a pain for cross-platform development.
        
           | cute_boi wrote:
           | Additionally, we don't have to package whole node js thing.
        
         | jmnicolas wrote:
         | For example a reader app where you can't host everything on the
         | server. My ebooks collection is 1TB big, and my videos are
         | something like 20TB.
        
         | epsilonfm wrote:
         | For me, developing epsilon.fm with Tauri
         | (https://github.com/epsilon-records/epsilon.fm) it's all about
         | offering our application on platforms that our competitors
         | (i.e. DistroKid) don't currently reach.
        
         | brigadier132 wrote:
         | Write once run everywhere is the holy grail of app development
         | and the browser is the only realistic way of achieving this.
        
         | jauntywundrkind wrote:
         | Can anyone explain what Tauri or webviews offer that makes them
         | a good choice over a local-http-server webapps? Imo, as a user,
         | Webview, no thanks. Local webapps, yes please.
         | 
         | There really isn't a good reason for webviews or electron/tauri
         | that I can tell? Why some people love love love native apps, to
         | the extent they'd rather a dressed up webapps is confusing to
         | me. If it's already a webapps, hell yeah give me the user-
         | agency of extensions, browser history, tabs, back buttons, and
         | hyperlinks or give me death! Anything but the power-stripping
         | captive-audience of native apps!
         | 
         | It would be much better to package your app as a small daemon
         | that hosts a localhost webserver. The daemon can talk to all
         | the system APIs it needs to. Add a desktop icon or shortcut
         | that opens the localhost webpage. The daemon can present just a
         | regular HTML hypertext webapps as usual, so all the usual bits
         | of user-agency can slot into the overall experience.
         | 
         | Theres a lot of usenet-related apps that work like this, that
         | run as daemons, and have web interfaces. Sunshine game
         | streaming too.
         | 
         | It's be great to have some massively multi-platform http-headed
         | app frameworks! That does seem semi missing, especially wrt
         | mobile integration.
        
           | TheCleric wrote:
           | You are absolutely the exception there, especially if you are
           | talking about an average low tech user.
        
         | duped wrote:
         | I mean there are so many reasons why you would want to do this
         | it's impossible to enumerate them all. Key command overrides
         | are a great example of bad behavior on the web that is
         | essential to UX in a native app. Or mouse pointer control. File
         | system access and other native APIs the browser doesn't expose,
         | or makes a pain.
        
         | hobofan wrote:
         | You build something that needs access to to the filesystem? ->
         | No other choice than a desktop app. (Chrome has some limited
         | APIs around that, but AFAIK only sandboxes ones and not e.g.
         | existing directories)
        
         | flessner wrote:
         | There are many things web browser can technically do nowadays,
         | but aren't great or not supported in all browser.
         | 
         | - File System (Obsidian, Logseq)
         | 
         | - Push Notifications (IM, Social Media, Email)
         | 
         | - USB/Bluetooth (Doesn't work in Safari?)
         | 
         | - Global Hotkeys (Raycast)
         | 
         | - Interfacing with other local Apps (localhost is often
         | blocked)
        
         | codeptualize wrote:
         | Anything that needs os access, to name some things: menu bar
         | apps, clipboard access, file system, multi window, etc etc.
         | 
         | You can do a lot of things in the browser, but usually it's
         | limited (mainly for security reasons). Having it be an app
         | allows you to better integrate with the OS.
        
         | Klonoar wrote:
         | For Slack & co, being able to be on the native application dock
         | (for the average user) instead of buried in a tab is considered
         | a significant visibility boost.
         | 
         | It's also something that came about from when web apps on
         | desktop/PWA didn't have nearly as much reach. With e.g modern
         | macOS support for PWAs you might be able to get away with just
         | the web app now, depending on your target customer.
        
         | ktosobcy wrote:
         | Sadly instead of having native apps we have "web"
         | monstrosities... each sporting custom "fancy" UI instead of
         | following the OS native style...
        
           | traveler1 wrote:
           | Because WinUI and QT are so glamorous and offer a super
           | intuitive development experience. /s
        
             | sirwhinesalot wrote:
             | Best part is that neither of those follows the "native
             | style" either. There's no dark uxtheme provided by windows,
             | so Qt falls back to their fusion style. Even the "native"
             | light theme doesn't follow the new "fluent" style so that's
             | also a shitshow.
             | 
             | As for WinUI 3, apps are supposed to bundle it, so if you
             | target Windows 11 and run the app on Windows 10, it'll look
             | all rounded and drop-shadowy instead of flat like native
             | Windows 10 apps. Great stuff.
        
         | EasyMark wrote:
         | I have too. I think the big deal is easy to do cross platform +
         | reuse your javascript/css skills for gui + lower memory
         | footprint than electron apps. I'm waiting until I see some
         | major apps done in it.
        
         | vunderba wrote:
         | It makes more of a difference for the end-user then the
         | developer necessarily.
         | 
         | An end-user can continue to use your electron/tauri app for
         | years after a website has long since vanished into the infinite
         | void.
         | 
         | But vunderba you think to yourself and also how did I know what
         | you were thinking just call me the amazing kreskin, _" what
         | about a PWA? - you can use that off-line"._
         | 
         | PWAs give the deceptive illusion to the laymen that they're
         | installing an actual application as opposed to just a bunch of
         | ephemeral stuff thrown inside the user data folder of the
         | respective browser.
        
       | wubrr wrote:
       | Took a look at the homepage (https://v2.tauri.app/)... and
       | basically have no idea what this is or why I would use it.
       | 
       | Consider adding something more informative than 'Hardened
       | foundation for your web apps', and maybe an 'About' page.
        
         | sshine wrote:
         | I clicked "Get started..." and saw this:
         | 
         | > _What is Tauri?_
         | 
         | > _Tauri is a framework for building tiny, fast binaries for
         | all major desktop and mobile platforms. Developers can
         | integrate any frontend framework that compiles to HTML,
         | JavaScript, and CSS for building their user experience while
         | leveraging languages such as Rust, Swift, and Kotlin for
         | backend logic when needed._
         | 
         | This ought to be on the front page.
        
           | wubrr wrote:
           | Yeah for sure. Personally I wouldn't click 'Get started...'
           | on anything unless I already know what I'm getting started
           | with and why.
        
           | dcre wrote:
           | I agree. The v1 front page says this, which is ok but much
           | less clear: "Build an optimized, secure, and frontend-
           | independent application for multi-platform deployment."
        
         | sva_ wrote:
         | Electron replacement
        
       | sva_ wrote:
       | Oh they finally support mobile as well (at least beta.) Might be
       | worth checking out again.
        
       | srid wrote:
       | Related: Dioxus
       | 
       | > _Dioxus is a Rust library for building apps that run on
       | desktop, web, mobile, and more._
       | 
       | https://dioxuslabs.com
       | 
       | (Dioxus uses Tauri)
        
       | Sytten wrote:
       | We just finished migrating away from Tauri to Electron for our
       | desktop application after running Tauri for 2 years. We are a
       | rust shop so it makes sense to use Tauri, but I can't recommend
       | it for a startup use until they allow packaging a webview into
       | your build. The amount of time you currently have to spend in
       | debugging each OS/Version combination of bugs is simply
       | untenable. This is scheduled for v3 last time I talked to the
       | devs.
       | 
       | Otherwise good progress, happy to see it!
        
         | dvt wrote:
         | I also use Tauri for a startup project I'm getting off the
         | ground and I've been extremely impressed. Unless you're doing
         | something extremely non-standard, I'm not sure what edge cases
         | you're seeing. The webviews packaged with modern operating
         | systems are very compliant (essentially Safari on MacOS and
         | Chrome on Windows). The only wildcard is Linux which uses
         | WebKitGTK which does have all kinds of weird quirks (but that's
         | a comparably tiny market sector to begin with).
         | 
         | Using OS WebViews, you also get the added bonus of security
         | updates which you get for "free" with OS updates (otherwise you
         | have to handle these yourself). There have been some RCE
         | exploits in Electron, so it's something you need to keep an eye
         | out for.
        
           | Sytten wrote:
           | Yup this was also our first impression. Wait until you have
           | users (no snark here, but its the reality). We do have around
           | 1/3 of our users on Linux and WebKitGTK is plainly bad.
           | 
           | Our application is complex I will give you that, but it isnt
           | just that. Say you want to use WASM you have to check which
           | macos versions you want to support and check the oldest
           | possible webview (it doesn't get updated at the same time as
           | safari), check which subset of WASM that supported, etc. It
           | really is a nightmare of subtitle bugs that are hard and time
           | consuming to reproduce.
           | 
           | OS webviews in our findings have a way worse update cycle
           | than us shipping a new version of the app.
        
         | lovethevoid wrote:
         | Have you or your team written about the migration? Would love
         | to read about that more as usually there's a lot to learn from
         | these situations even when you don't make the same move.
        
           | Sytten wrote:
           | We might do it, I don't necessarily want to push bad
           | publicity on Tauri since I want them to succeed in the end :)
        
       ___________________________________________________________________
       (page generated 2024-08-02 23:00 UTC)