5 ms·
Personally I'm a big fan of https://github.com/wailsapp/wails/ https://github.com/wailsapp/wails/ It uses native webview so no electron. Let's you effortlessly
by Philip-J-Fry 6y ago
Personally I'm a big fan of https://github.com/wailsapp/wails/ https://github.com/wailsapp/wails/
It uses native webview so no electron. Let's you effortlessly bind JS functions to those in Go.
V2 is in the works and will effectively bring the best features of electron window management (menus, frameless windows, drag regions etc) over to native webview.
Currently uses IE11 on Win 10 but V2 will only support Edge so you get WebKit across the board.
- FeistyOtter 6y agoI am only familiar with Electron (due to its hype), what is native webview, is it like a browser? If yes why is it better? Asking as someone who has never developed any desktop apps.
- Philip-J-Fry 6y agoIt uses what is built into the OS, the native UI control which renders web pages. It doesn't need to download a whole 200mb Chromium or anything like that. So your binaries can be really small too. Seems like faster start up times also.
- flohofwoe 6y agoIt's a minimal native application which creates a window with an HTML widget in it, essentially a mini-browser wrapped in a native application. The difference to Electron is that this browser isn't a bundled Chromium, but the browser engine that's integrated with the operating system (Edge on Windows, WebKit on macOS and Linux), so the application installer is much, much smaller. When I tinkered with https://github.com/webview/webview https://github.com/webview/webview on macOS a minimal Hello World application was around 26 kBytes (kilo, not mega), which is about 7000x smaller than a default macOS Electron instance (173 MBytes).
- philsnow 6y ago> this browser isn't a bundled Chromium, but the browser engine that's integrated with the operating system so I wouldn't have to worry about various electron app packages shipping with versions of Chromium from three years ago?
- flohofwoe 6y agoThe downside is that as the application developer you no longer can control the browser version your code is running on, so you may need different code paths for WebKit vs Edge, or old vs new browser versions, but this is the same problem normal webpages have to deal with. But at least you can call out into native code and native operating system APIs, unlike "real" web applications.
- flohofwoe 6y ago> but V2 will only support Edge so you get WebKit across the board The new Edge browser uses Chromium, not WebKit, so still two different browser engines to deal with (essentially Chrome vs Safari).
- Philip-J-Fry 6y agoI am aware it uses Chromium. But surely you're aware that Chromium uses Blink rendering engine which is a fork of WebKit? 99.9% of the time your pages render the same on Safari as they do in Chrome because it's effectively WebKit. The only real difference between WebKit based browsers is experimental features. They all follow the core standards now which IE11 didn't.