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 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 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!