Is there any plan to upgrade Wails to use the new version of WebView?
Looking at https://github.com/wailsapp/wails/wiki/Post-V1-Enhancements you're planning to move to DeskGap but it seems like WebView is not really dead and upgrading Wails to use the new version should be quite trivial.
I hope you do reconsider for for now.
Thanks
Hi. We've tried multiple times to upgrade to the latest webview but there is always a major blocking issue. The main one has always been flakey Mac support which I opened a ticket for here: https://github.com/webview/webview/issues/236 - it was closed but not resolved. The current open issue count on the webview project is close to 200 and a quick look over them shows some pretty major issues. The windows support relies on a sidecar DLL which seems to cause a lot of issues if you look through the issue list.
So will we move to the new webview? Unlikely. Do we want to solve the mshtml issue? Absolutely!!
The reality is that the goals of the webview project are different from what we want to achieve, which is much more specialised. We actually won't be adopting deskgap, but using our own library for windowing. This has been a bit easier than expected so far with Linux pretty much done. Having control over the library means we have been able to rearchitect the guts of Wails to be way more efficient than using webview. For instance, now we don't need to use Wails.Init to wait for all the plumbing to be in place before calling your code, as all that is compiled in to the windowing library, in C. This means startup time is much faster and the projects cleaner. The default hello world svelte template compiles down to 3M uncompressed and the start up time is roughly 3x the current builds.
What about Windows support? We've been holding off on Windows support until MS starts pushing out edge/chromium as default, which they now have started doing. That's our primary target.
Hopefully that clears things up. V2 will support the latest tech and it's well on the way. We mostly just need to complete the Mac and Windows libs now Linux is pretty much done.
@leaanthony is there anyway we can take a look at v2? Is there a roadmap or list of new features or any approximate release date for v2?
Looks like there are some much needed new features are going to be available in v2.
@ilgityildirim No access as of yet but am writing up a blog post about it. Let me know if there's any specific questions you have.
@leaanthony at the top of my head menu bar, context menu, modern CSS / JS support via modern native webview (MS Edge for example), app icons for linux, system tray, notifications comes to my mind.
Of course things like system tray, notifications can be done via 3rd party too. Although might be good to have an option from Wails as well.
For the windowing/webview system what are your plans?
DeskGap seems impressive since it replicates a lot of Electron API features which I am personally fond of. I've looked into possibly trying to write a C wrapper for the DeskGap windowing/webview code but it's not too straight forward because of the reliance on Node NAPI and I'm a C noob.
If there's one thing in particular I want to see it's frameless windows with custom title bars and such. This is something WebView doesn't currently offer but DeskGap does. Do you see this as a particularly important feature?
I think being able to build a custom window frame would make Wails hands down the best UI solution for desktop Go apps. In my eyes it's the only benefit other projects such as https://github.com/asticode/go-astilectron have. But I don't want to use that because the development experience is horrible since you need to rebuild the application with the bundler and the executables are like 250MB in size 馃槃
So frameless windows is already done for linux. I'll be writing a blog post soon which will be a better place for this, but for now I'll post what I wrote on the slack channel:
Wails V2 has the following features:
Assets are compiled to C, not embedded in Go. This makes start up time insanely fast.
Because we now have our own windowing library, the js runtime and bootstrap code is evaluated first before your code even starts. This ensures the JS runtime is available to you without having to wrap your code in Wails.Init() .
The windowing library currently supports: Hide/Show, Center, Min/Max Size, SetSize, SetPosition, Minimise/Unminimise, Maximise/Unmaximise, Fullscreen/Unfullscreen, SetTitle and Frameless mode. We support dragging frameless windows by recognising any element with an attribute of wails-drag and allowing you to drag with that. All of this is available in both the JS and Go runtimes.
Projects have been simplified slightly: Assets are defined in the project json, not included in your code. There's an assets directory local to the project. Anything in there is auto-bundled into your app and accessible from an API.
Native menus will be supported.
And the biiig one: You can build a server version of your app with no changes to your code. Serious. It will open a port and give you the same app in a browser. This allows you to build server apps in an interesting way. Some things won't work like the window API and a few other things, but 99% will. If we get chance, even menu's will work via an html menu injected into the app.
Initial tests have shown serious improvements to performance and file size. Our hello world svelte app compiles to 3M as a Desktop app and 9.5M as a server app. Startup time is a minimum of 3x faster.
Wow that sounds incredible. Amazing work 馃憦 , I am really looking forward to seeing that! This will be huge for Go GUI apps.
I posted a video on the slack channel. It may interest you.
Is there a link to the blog post mentioned earlier?
I never got round to it. Been too busy with V2 馃槂 But thanks for the reminder!
Most helpful comment