Wails v2 Released
wails.io
wails.io
Wails: Build cross-platform applications using Go - https://news.ycombinator.com/item?id=32080899 - July 2022 (45 comments)
Also props to the lead maintainer Lea Anthony who seems to be behind all the very exciting momentum of the project
I’m using Svelte, but I don’t think that matters too much. The popular front end frameworks are close enough in performance IMO. I think it would really come down to dividing up the operations so the expensive ones run in native code instead of JS.
As for my part, I've regrettably been pretty absent on go-webview2 lately, working on other projects and life, but it's cool to see some initiative on porting OpenWebView2Loader bits to Go thanks to Wails. For anyone wondering what this is, on Windows right now go-webview2 avoids CGo by linking directly to WebView2Loader.dll and implementing COM bits in Go. However, to make matters a little complicated, this DLL is also embedded into the binary and then loaded with a memory implementation of the Windows loader, in order to avoid needing to separately ship this DLL. If this sounds horrific, I agree; my intent was always to reverse engineer WebView2Loader and port it to Go, but I only ever finished the reversing part. In the meantime, it has been ported to Pascal, and maybe soon, it will be ported to Go, too. It's pretty uneventful for the end user, but I think it will lead to better robustness in the end, so I am excited for it.
The end result is a single binary. I suspect there's interesting things to be built as small extensions/compliments to command line tools.
Now take it to the next level: put those functions in a service worker and create a REST API that works entirely locally and can be switched out for a remote server with ease.
Or don’t, if you have no intention of making a web version. But IMO it’s a powerful model for those who do.
The notion of a web version is a distant one for the current project so it's only a theory.
I'm also enamored with https://redbean.dev/ -- this is a good problem to have: which awesome project to play with?
I thought about implementing something like this with a SBC to replace a broken motorcycle dashboard but never got around to it.
It's a little complex app dealing with Win32 API's directly from Go and the binary being just 10MB is amazing, which can be compressed further with UPX.
Though, UPX-compressed Go binaries has a very high rate of being flagged by antivirus software (especially MS Defender).
The goal was having the convenience of building UI in React and have the heavy lifting done by Go. Both, stacks I am very familiar with and work with daily.
Does anyone have experience developing in Wails? How is the dev experience?
Also, having contributed I have to say the source code is very well organized and easy to understand!
I miss desktop UI designers.
You still need to spin up an instance of your operating system's javascript engine correct?
Edit: it looks like it leverages its own Webkit for the frontend, but then how is this more efficient than Electron ?
Chromium has many more batteries included though, such as V8/Node.
I think projects like Wails bring together the best of both worlds, without the drawbacks of something like Electron.
Kudos to the team for releasing v2! I'm looking forward to trying it out.
E.g. include only the Canvas part, leave out JS, CSS, Video, etc. for a simple drawing app.
But I'll keep an open mind and give it a look
Wails is really well done, and pretty minimal, and (to me) doesn't feel like Rails at all.