Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron UI for Golang Program?

I'd like to make a GUI in Electron for a Desktop Application written in Go (currently it's a command line tool).

What's the convention for communicating between the Electron and Go processes?

Would simply using the Go binary as an API work? Some sort of websocket communication?

like image 439
Ashkay Avatar asked Apr 30 '16 23:04

Ashkay


People also ask

Can you use Golang with Electron?

Electron: bundled Node. js and the Chromium browser to create a packaged local web-app. Usable with Golang frameworks like go-app or go-astilectron.

Is Electron good for GUI?

Electron is the best cross-OS GUI platform I've used To begin with, Node. js is a joyful development platform. Then, it's joyful to write the application using HTML+JavaScript, as you do in Electron. Finally, Electron makes it relatively easy to put all that together.

Is Electron good for desktop apps?

With an improved runtime and great integration with JavaScript and Node. js, Electron JS makes both designing desktop apps and maintaining them on cross platforms easier and better.


2 Answers

You can use go-astilectron it allows you to build cross-platform GUI apps with GO and HTML/JS/CSS (powered by Electron) (disclosure: I'm the author)

like image 195
Asticode Avatar answered Oct 01 '22 19:10

Asticode


The interaction of an application written in electron with its backend is exactly like a Web browser, therefore you have the same options (Web Api, Web Sockets, Ajax, etc.)

like image 28
felipecamposclarke Avatar answered Oct 01 '22 18:10

felipecamposclarke