Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gotron

> 编程语言
Open source

Go Api for Electron

784 stars0 likes3 views
WebsiteGitHub

About

Go Api for Electron

Gotron

Go Api for Electron.

⚠️ This project is no longer maintained. ⚠️

Feel free to fork and make your own changes if needed.

Example Projects

A list of boilerplate projects using gotron.

  • https://github.com/Marlon-Monroy/gotron-react-boilerplate

Prerequisites

go1.11 with modules enabled, nodejs and npm must be available on your system.

Quick Start

On the first run it will download Electron and stores it in .gotron in your working directory.

…

Send event to backend

javascript
ws.send(JSON.stringify({
    "event": "event-name",
    "AtrNameInFrontend": "Hello World!",
}))

Distribution/Packaging

To package a go application together with electornjs use gotron-builder.

Install gotron-builder

We provide executables for Linux, MacOS and Windows.
Download the newest release from https://github.com/Equanox/gotron/releases and add it to your $PATH.

Using gotron-builder

It expects...

  • a directory containing a golang main package
  • and a directory with a webUI containing at least a index.html

By default it will implicitly use...

  • golang main package from the current directory
  • webUI from .gotron/assets

To pack the code from Quick Start use

bash
gotron-builder

in the root of your repo.

Pass your go code and webUI explicitly.

bash
gotron-builder --go=your/go/dir --app=your/webapp/dir

For cross compilation you can use the same flags as electron-builder would expect them

gotron-builder --win 

Read about the requirements for cross-compilation in electron-builders documentation.

Tasks

  • Basic js + webpack example
  • React example
  • Typescript-React example
  • Vue.js example
  • Elm example
  • Flutter Hummingbird example
  • Hide nodejs/Electron behind go api
  • Create executables for Win, Linux, MacOS
  • Hide nodejs/Electron behind go api
  • Msgs between golang and Electron renderer process, abstracted in a javascript/typescript package
  • Implement complete BrowserWindow api see => BrowserWindow.md
  • Implement complete electron-builder api in gotron-builder

Sponsors

License

MIT

Except Roboto (ui/js/src/Roboto-Light.ttf , ui/react/src/Roboto-Light.ttf) which is licensed under Apache 2.0
https://github.com/google/roboto

Issues· 22 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptelectrongolanggui

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言