Hacker News new | ask | show | jobs
by zserge 3165 days ago
Since Go and Electron are mentioned, let me offer a web UI library for Go: https://github.com/zserge/webview (I know UI has been a problem for Go apps for a while and is often a stopper when it comes to writing desktop apps in Go).

The library creates a full-screen webview window and lets you write UI code in HTML5/CSS/JS connecting it to the core app logic written Go. It provides JS-to-Go bindings allowing to call Go code from JS and vice versa.

The whole library is a single header file of ~800LOC with a thin Go wrapper. It supports Windows 7+, MacOS, Linux and OpenBSD.

Executables are 5-10MB in size and take about the same amount of RAM. No external libraries are used on Windows and MacOS, on Linux gtk-webkit is required, but it is typically one "apt-get" command to run.

1 comments

This looks pretty cool. I noticed on windows this uses mshtml. What browser tech does this use on windows 10?

Another question is around intercepting xls/doc responses to load them into office. Is there a way to do this with this framework?

Thanks!

On Windows 7 SP1 it uses IE11. Same on Windows 10. On some Windows 8 it might use IE10, which is still not that bad.

Sorry, can't tell much about xls/doc. It's aimed to be a web UI for your app. Normally, you app would be a web server then. So if you want to handle certain requests and open external apps - you surely can do it.