Cocoa + Metal on macOS · Win32 + Direct3D 11 on Windows · X11 + Vulkan on Linux.
No WebView, no browser engine, no bundled runtime.
Website · Documentation · Components · Showcase · 简体中文
Viva is a Go framework for native desktop applications. It draws windows, text and components straight through each operating system's own APIs and the GPU, so an application links the system frameworks and the Go runtime — nothing else. An idle application does no work at all.
1.6 MiB stripped window · 0 GPU submissions while idle · 0.0% idle CPU
Measured on an M0 Mac. Every number comes from a report in the repository — rerun them yourself.
|
Native, not a browser macOS calls Cocoa and Metal, Windows calls Win32 and Direct3D 11, Linux calls XCB and Vulkan from the system's own libraries. No WebView, no bundled renderer. |
Idle means idle An unchanged frame does no layout, rebuilds no scene and submits nothing to the GPU. No background timers, no polling loops. |
Components you ownviva add copies a component's Go source into your project. No component registry and no stylesheet parser at runtime — just Go you can edit.
|
Testable without a window The headless driver runs the real painter, input router and focus rules from explicit calls, so tests need no desktop session. |
|
One API, three native backends The same components, input, text and accessibility semantics on macOS, Windows and Linux. |
Measured, reproducibly Binary size, idle cost and scene timings are quoted from benchmark reports on named machines and builds. |
# macOS / Linux
brew install vivaui/tap/viva
# Windows
scoop bucket add vivaui https://github.com/vivaui/homebrew-tap
scoop install viva
viva doctor # is this machine ready?
viva init hello # a runnable project, with a window and tests
cd hello && viva dev . # hot reload: save a file, the window keeps its statePrebuilt archives with SHA256SUMS are on the releases page. Go 1.26 or newer; viva downloads the toolchain once if you have none.
package main
import (
"fmt"
"log"
"github.com/vivaui/viva/app"
"github.com/vivaui/viva/ui"
)
type model struct {
clicks int
}
// page declares the window's content. It runs on every repaint and reads the
// model; a click changes the model, and the repaint that follows shows it.
func (m *model) page(c ui.C) {
ui.Column(c).Fill().Pad(24).Gap(12).Children(func() {
if ui.Button(c, fmt.Sprintf("Clicked %d times", m.clicks)).Clicked() {
m.clicks++
}
})
}
func main() {
m := &model{}
if err := ui.Run(app.Config{Title: "Hello", Width: 480, Height: 240}, m.page); err != nil {
log.Fatal(err)
}
}The state is yours, the layout is a function of it, and there are no coordinates to keep in sync. When nothing changes, nothing runs. Read the guide →
| Repository | What it is |
|---|---|
| viva | The framework, its components and the viva command. |
| awesome-viva | A curated list of applications, tools and resources. |
| homebrew-tap | The Homebrew formula and Scoop manifest for viva. |
macOS (Cocoa · Metal · CoreText) · Windows (Win32 · Direct3D 11 · DirectWrite) · Linux (X11 · Vulkan · Pango/Cairo) — and an optional WebAssembly target that previews the same components in a browser without touching the desktop runtime.
Platform details · Performance
Viva is Apache-2.0 licensed. Screenshots belong to their respective applications.