wails
Create beautiful applications using Go
Wails lets Go developers build native desktop apps with a web-based UI using React, Vue, or plain HTML, packaged as one small binary without bundling a full browser like Electron.
Wails is a framework for building native desktop applications using Go for the backend logic and standard web technologies (HTML, CSS, JavaScript) for the user interface. It is often described as a lightweight alternative to Electron, the popular but resource-heavy framework that powers apps like VS Code and Slack.
The core idea is straightforward: Go developers often want to ship a graphical desktop application but do not want to learn a new native GUI toolkit. With Wails, you write your application logic in Go as you normally would, write your interface as a web page using React, Vue, Svelte, or plain HTML and JavaScript, and Wails packages both into a single distributable binary. The Go backend and JavaScript frontend can call each other's functions directly — you can invoke Go methods from JavaScript and receive results back, without setting up a server or HTTP API.
Unlike Electron, Wails does not bundle a full copy of Chromium (Google's browser engine). Instead, it uses the operating system's native WebView component — WebView2 on Windows, WKWebView on macOS, and WebKitGTK on Linux. This means the resulting apps are far smaller (often under 10 MB compared to Electron's 100+ MB), use significantly less memory, and feel more like native applications. The tradeoff is that rendering behavior can vary slightly between platforms.
Wails also supports native OS features: system menus, native file dialogs, dark and light mode, and the translucent "frosted glass" window effects seen on macOS.
You would use Wails when you are a Go developer who wants to ship a polished desktop GUI application without switching to a different language or embedding an entire browser. It supports Windows, macOS, and Linux. The project is built in Go itself and the CLI handles scaffolding, hot-reloading during development, and production builds.
Where it fits
- Build a cross-platform desktop app in Go with a React or Vue UI and ship it as a single executable under 10 MB.
- Replace a bloated Electron app with a Wails version to dramatically reduce memory usage and binary size.
- Add a native GUI to an existing Go command-line tool using a simple HTML form as the interface.
- Use native OS features like file dialogs, system menus, and dark mode in a Go desktop application.