explaingit

andlabs/ui

8,359GoAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Go library for building desktop apps with native-looking windows and controls on Windows, Mac, and Linux, wrapping the C library libui, currently mid-alpha and best suited for small programs and experiments.

Mindmap

mindmap
  root((andlabs/ui))
    What it does
      Native GUI in Go
      Cross-platform
      Wraps libui
    Platform support
      Windows Vista+
      macOS 10.8+
      Linux GTK+ 3.10+
    Status
      Mid-alpha
      Not for production
    Getting started
      Install platform deps
      Single go get
      Example programs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a small cross-platform desktop tool in Go that uses real OS controls instead of rendering a web browser.

USE CASE 2

Prototype a simple GUI utility that runs natively on Windows, Mac, and Linux from a single codebase.

Tech stack

GoCGTK+libui

Getting it running

Difficulty · moderate Time to first run · 30min

Linux requires GTK+ 3.10+ from your package manager, Windows requires embedding a manifest file for correct control rendering.

In plain English

This is a Go library for building desktop applications with native-looking user interfaces. Go is a programming language made by Google. A native GUI means the windows, buttons, and controls your app shows will look and behave like they belong on whichever operating system the user is running, whether that is Windows, Mac, or Linux, rather than rendering a custom look from scratch. The library is a Go wrapper around a separate C library called libui, written by the same author. On Windows it uses the platform's built-in controls going back to Vista. On Mac it requires macOS 10.8 or newer. On Linux and other Unix-like systems it relies on GTK+ 3.10 or newer, which you install through your package manager before using the library. The project self-describes as mid-alpha software, meaning it is not finished and not ready for production use in large or complex applications. Some parts work stably enough for small programs and the included examples, but many features are incomplete, some behavior is buggy on specific platforms, and the API is still changing. The README points to the libui project for more detail on the current state. Installing it in a Go project is a single command once the platform dependencies are in place. On Windows there is one extra setup step: the library requires a Windows manifest file that enables a specific version of the system's control rendering library. The README explains how to embed one using a provided subpackage, or how to supply your own. A handful of working example programs are included in the repository and can be built individually as a starting point for learning the API.

Copy-paste prompts

Prompt 1
Using andlabs/ui in Go, write a desktop window with a text input field and a button that shows the typed text in a label when clicked.
Prompt 2
How do I set up andlabs/ui on Ubuntu Linux? List the GTK+ packages to install via apt and the go get command to add the library to my module.
Prompt 3
Show me how to embed the required Windows manifest file into a Go app that uses andlabs/ui so the controls render with the correct visual style on Windows 10.
Prompt 4
Walk me through running the andlabs/ui example programs from the repository so I can see what the library can do before writing my own app.
Open on GitHub → Explain another repo

← andlabs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.