4 ms·
How?
by moralestapia 3y ago
How?
- jsheard 3y agoI think Tauri is the most established "like Electron but with the system webview" framework. It supports wiring up native Rust code behind the webview frontend. https://tauri.app https://tauri.app The obvious downside compared to Electron, besides maturity, is you have to test the frontend on multiple browser engines rather than just bundling Chromium everywhere and calling it a day. It uses Microsofts flavor of Chromium on Windows, Apples flavor of WebKit on their platforms, and WebKitGTK on Linux.
- grujicd 3y agoThere's a small problem with Windows, there are no guarantees you'll have Chromium based Edge installed on a system. You'll have to download and install it if not present, and when I looked it was 100+MB. Sure, you don't have to include it in installer, but you have to account for that case.
- jsheard 3y agoI haven't seen it in action but according to the docs their installer will automatically download Chromium Edge if it's not already installed, so the end-user doesn't have to deal with it, and Windows 11 has it out of the box so that case will only trigger on older versions.
- duckmysick 3y agoIsn't that how it works with Windows software that requires Microsoft Visual C++ Redistributables? The installer checks if they are there, downloading the missing ones when needed.
- josephg 3y agoEven tauri’s own benchmarks show it takes thousands of syscalls to bring up a “hello world” app in tauri. This isn’t lean software. Just because the download size is small doesn’t mean the software is fast or efficient.
- hgs3 3y agoYou can create the web control using each platforms native GUI toolkit and setup JS communication yourself OR you can use a lightweight library that does it for you [1] (search this projects README for language "bindings"). [1] https://github.com/webview/webview https://github.com/webview/webview
- grujicd 3y agoYou still need access to native menus, clipboard, dialogs, drag&drop, etc. There are no light multiplatform libraries for that afaik. Either you'll use Electron, which is more or less these services + browser. Or you'll use some of full multiplatform GUIs, which all have their limitations and drawbacks. Potentially you can use hybrid - web control inside one of multiplatform GUIs (if web control is available at all), but you'll have to reimplement some IPC stuff for communicating with web part. That part already exists for Electron. And you'll still have to rely on this multiplatform GUI and deal with its issues. There's also a matter of trust, Electron if nothing else has VS Code, so we all know that production ready application is possible, even if it's not trivial. It's not that clear cut for Avalonia, MAUI, etc.
- hgs3 3y ago> You still need access to native menus, clipboard, dialogs, drag&drop, etc. You don't need a library for these features. Their easy to access through each platforms native API's and if you go the route of creating the webview yourself (no library) it's a moot point as you're interfacing with the OS anyway.
- grujicd 3y agoIs it easy if you have to use 3 separate native APIs for 3 platforms, where presumably you're mostly proficient with just a single one? To paraphrase Churchill, Electron is the worst multiplatform GUI solution, except for all the others that have been tried.