Vugu lets developers build browser UIs in Go compiled to WebAssembly with Vue-like single-file components. It targets modern browsers and remains explicitly experimental.
Overview
Vugu is a library for writing web front ends in Go that compile to WebAssembly instead of JavaScript. Single-file .vugu components generate Go code, support vue-like template directives, and sync to the DOM from idiomatic Go structures.
The project emphasizes standard Go tooling: go generate runs vugugen, developers own the main and render loop, and optional dev servers are simple Go snippets rather than bespoke CLIs. Features include CSS in components, vg-if and vg-for control flow, DOM events, slots, server-side rendering experiments, and TinyGo compilation paths.
Examples run via mage tasks inside Dockerized nginx servers for quick previews. A VS Code plugin assists editing .vugu files.
Documentation on vugu.org tracks rapid iteration, with release notes detailing breaking changes such as HTML escaping defaults. Community discussion occurs on Gophers Slack #vugu.
Because the stack is experimental, APIs and internals continue to evolve and may require frequent updates when upgrading.
Key features
- Go source compiled to WebAssembly UI
- Vue-inspired single-file components
- vg-if, vg-for, and vg-content templating
- DOM event bindings from Go
- Server-side rendering prototype
- TinyGo compilation support
- Mage-based example build tooling
- VS Code plugin for .vugu files
Use cases
- Prototyping Go-only browser interfaces
- Avoiding JavaScript frontend stacks for Go teams
- Teaching WebAssembly UI experiments
- Go component experiments