Wails as Electron in Go

synergy20
224
48
6d
WAILS.IO

Comments

campbellmorgan 6d
I've been using v2 for a month or so and it's really great. There are a few things that feel a little bit rougher than the Rust equivalent (Tauri), but Go is just so much faster to code in that this has been a pleasure to work with.

Also props to the lead maintainer Lea Anthony who seems to be behind all the very exciting momentum of the project

cheriot 6d
I've been work on a proof of concept with Wails and it's a productive development loop. The only thing different about the front end code vs a website is that it calls functions generated from my Go back end (fully typed!) instead of making an HTTP call.

The end result is a single binary. I suspect there's interesting things to be built as small extensions/compliments to command line tools.

marcus_holmes 6d
This looks interesting, but I'm always hesitant to use anything in Go that's developed with a Rails mindset. They're two very different ways of looking at development, and trying to anything in Go using a Rails mindset usually ends in very confused code.

But I'll keep an open mind and give it a look

jallasprit 6d
I made a speedometer display application for my motorcycle with Wails 1, and it has been great tbh. Low requirements and all
djsavvy 6d
This looks incredible. I built a posture improvement app for MacOS, with the timing code written in Go and the actual window display in Swift. This seems like it would have been a far cleaner solution overall.

Does anyone have experience developing in Wails? How is the dev experience?

encryptluks2 6d
This looks incredible. Really nice work so far. While I'm not interested in the more bloated frameworks, hoping that I can create something useful with just vanilla JS, HTML, and CSS. Could possibly even plug into Hugo to create a "native" app for content creators.
jchw 6d
Congratulations to everyone who worked on this! I'm definitely going to have to give this a chance. The fact that it doesn't require any large dependencies shipped with the application is a huge draw, and with native UI options in Go being a little lacking, it would suffice to say this option is currently very enticing.

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.

arush15june 6d
Wails is great! I've been working with wails v2 on Windows, and it's been a great experience. Built and delivered a Windows desktop application in Go + AntD for a customer really quickly.

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).

01walid 6d
How does this compare to Tauri ?

Edit: it looks like it leverages its own Webkit for the frontend, but then how is this more efficient than Electron ?

thechao 6d
I feel, in my bones, that this must have been done for C, too: could someone google it for me? Doing a search for "... C Electron" is a bit fruitless.
rank0 6d
Is there a serious performance benefit here instead of using electron?

You still need to spin up an instance of your operating system's javascript engine correct?

throw_m239339 6d
What's the size of an Hello World with Wails? uncompressed? Because that's the issue with Electron, shipping yet another entire web browser with every installation. At the same time, if the app doesn't ship with a browser and use the webview available then it defeats the purpose of using that kind of tech since it means that whatever chromium engine which runs on the user's device has to be tested. No an issue for simple apps, a much bigger one with complex applications with browser API edge cases.
badrabbit 6d
Is there multi-window support yet? I wanted to do a hobby project with it months ago but spent too much time before I found out it can't do that. Wails+svelte+go was going to be my stack.

I miss desktop UI designers.

simscitizen 6d
Are there ways to create cross-GC cycles with this framework (e.g. JS object pointing to Go object pointing back to a JS object), and if so, how does the framework handle this?
amelius 6d
It would be great if you could configure this depending on needs.

E.g. include only the Canvas part, leave out JS, CSS, Video, etc. for a simple drawing app.

HillRat 6d
Looks interesting and a great deal more elegant than the usual Electron mess, though I'm running into some kind of race condition on Windows that continually crashes `wails dev`, so that's a bit disappointing. Nonetheless, looking forward to using this.
kelvie 6d
Wombat, a wails based gRPC GUI client has been working great for me and my team, and we use it for every gRPC demo we have to give since it's been introduced to the team.
dang 6d
Discussed recently:

Wails: Build cross-platform applications using Go - https://news.ycombinator.com/item?id=32080899 - July 2022 (45 comments)

throwoutway 6d
Is there something similar but for Python?
evanrelf 6d
Wuby on Wails