from Hacker News

Wails – Electron Alternative Powered by Go

by wener on 6/16/22, 11:32 AM with 93 comments

  • by jchw on 6/16/22, 1:07 PM

    The lead Wails developer has contributed a good deal of functionality and improvements to go-webview2, a library I wrote for interfacing with Windows WebView2 without needing CGo. While not a whole lot of people use go-webview2 directly (indeed, most people use it via Wails 2,) I am still glad that so many improvements made it upstream for whoever just wants direct bindings rather than a cross platform framework.
  • by krapp on 6/16/22, 4:06 PM

    Today must be "Electron Alternative Day" on HN:

    Tauri 1.0 – Electron Alternative Powered by Rust[0]

    Sciter – Multiplatform HTML/CSS/JavaScript UI Engine for Applications[1]

    [0]https://news.ycombinator.com/item?shownew&id=31764015

    [1]https://news.ycombinator.com/item?shownew&id=31765566

  • by nobleach on 6/16/22, 1:10 PM

    Interesting that the authors chose to commit their .vscode directory... given that this project was donated licenses by JetBrains. Maybe it's just a convenience thing.

    On another tangent, I love seeing what music the authors were listening to while coding. Some might argue that it has no place in a README but... it's a nice touch.

  • by the__alchemist on 6/16/22, 4:08 PM

    Would there be interest in a cross-platform GUI written in C++ or Rust that uses HTML/CSS/JS as its layout and animation language, but runs natively on CPU/GPU without a browser layer?
  • by badrabbit on 6/16/22, 1:55 PM

    Spent some time learning this and playing with this till I ran into a roadblock that it doesn't support multiple windows which was a deal breaker for my idea. Wish I had the time to learn and contribute a PR. It was a great tool otherwise. I needed to do electron without the bloat and backend JS. There are no good solutions from what I researched, things like QT are still king in this area it seems.
  • by kitd on 6/16/22, 12:53 PM

    Love the logo, and quite appropriate given the name and the lead is obviously Welsh!

    https://github.com/leaanthony

    Cymru am byth!

  • by throwaway2016a on 6/16/22, 1:05 PM

    This looks interesting. I'ma fan of Go for backend and command line tool dev but haven't been able to find good front-end solutions. I'll have to keep an eye out for v2 of this since it is supposedly nearing release.

    In a similar vein: I've been experimenting a lot with Flutter and while I don't like Dart that much, the tooling around it (being able to use the IDE and quickly test my apps in different mobile devices and desktop for instance) is really good.

  • by londons_explore on 6/16/22, 1:38 PM

    Electron has a reputation for poor performance and slurping RAM...

    But most of that is down to the architecture choice (using an HTML renderer) rather than the implementation.

    I assume that means Wails has the same disadvantage?

  • by capableweb on 6/16/22, 12:47 PM

    Seems 1.0 was released a good while ago (and currently under a feature/patch freeze) and 2.0 is soon to be released. Not sure the version should be in the submission title.
  • by rvz on 6/16/22, 2:08 PM

    This is basically the same thing as Tauri but once again, the difference is the language used. I don't know what the selling point is other than it is using Go FFI to talk to the Desktop APIs.

    The reason why Electron exists is that it is able to directly turn existing web apps or anything using the Chrome APIs into desktop apps and being compatible with the wider Javascript ecosystem as well with little effort other than adapting to the desktop. I don't think that it is possible with this or Tauri unless you want to rewrite the whole thing and not depend on Chromium APIs.

    A great alternative would be compatible with these Chromium APIs and allow an easy migration off of Electron but that is not going to happen anytime soon.

    Either way, I'd rather see Flutter Desktop as a suitable competitor and a possible alternative to Electron desktop apps rather than these webview-based alternatives.

  • by iamflimflam1 on 6/16/22, 4:22 PM

    Might be worth having a look at this as well: https://github.com/fyne-io/fyne

        is an easy-to-use UI toolkit and app API written in Go. It is designed to build applications that run on desktop and mobile devices with a single codebase.
  • by SPBS on 6/16/22, 4:11 PM

    I was excited to prototype a HTML-template driven application using Wails, but found out that you're basically forced into making a SPA i.e. URL routing doesn't exist, you have to handle page transitions using JavaScript. Also there's no native back button, so one more thing to reimplement using JavaScript.
  • by password4321 on 6/16/22, 4:54 PM

    Related: https://github.com/fyne-io/fyne - Cross platform GUI in Go
  • by _verandaguy on 6/16/22, 2:05 PM

    Named after the wails of developers maintaining Electron code bases?
  • by rschachte on 6/17/22, 1:09 AM

    Would be good to add screenshots to README