Library / SDK
vugu/vugu avatar
vugu/vugu

Vugu: Go UI components that generate Go, served one nginx container per example

Vugu: A modern UI library for Go+WebAssembly (experimental)

5,011 stars174 forksGoMIT

At a glance

What is it?
Vugu is an experimental Go library that compiles .vugu component files to Go and runs the result in a browser through WebAssembly. Its build moved to mage in May 2024, its examples are separate Go modules served by nginx on localhost:8888, and its module pins three sibling repositories at 2019 and 2020 pseudo-versions.
Who is it for?
Vugu is worth a look if writing your frontend in Go matters more to you than shipping today, and worth caution if you need a component library or performance work already done, since both sit unchecked on the project's own roadmap. Read the version floor first: the go.mod pins go 1.22.3 for the loop changes in Go 1.22, so an older toolchain will not build it at all.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 53 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • vugu/vugu5,011 ★ · +8
Star history
Repository2026-09-232026-11-15
vugu/vugu5k5k

8 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Component files are inputs to a generator, not templates

A Vugu component starts as a .vugu file and ends up as Go. The project does code generation for those files, and it will also write a default main_wasm.go for a new project and rebuild your program when the page refreshes. The toolchain that does this is three commands: vugugen, vugufmt and vgfrom, and the build process for all three is managed by mage, a change the project dates to 2024-05-25. The library also carries browser side pieces, with a js/ directory in the tree. The claim in the README about how it is built is worth quoting in spirit rather than as marketing: it says Vugu is built more like a library than a framework, and that program flow, application wiring, initialization and the render loop that keeps the page in sync with your components all stay under your control. Frameworks call your code; here your code calls Vugu, even if some of that calling is generated for you at the start.

The build floor is Go 1.22.3, pinned for one language change

The minimum Go version is not a casual number. The README states v1.22.3 as the minimum and gives the reason: the project requires the for loop changes introduced in Go 1.22, and v1.22.3 was the latest version at the time of writing. The go.mod agrees, with a go directive set to 1.22.3 and no toolchain line above it. In practice a codebase written against Vugu cannot be built by anything older than that, which matters when your build image is not on the latest Go. The module also carries a go.sum and a dependency set that is short but spread: chromedp and cdproto for browser automation in tests, testify for assertions, urfave/cli/v3 for the command line, and three Vugu owned modules, vugu/html, vugu/vjson and vugu/xxhash, pinned to pseudo-versions dated 2019 and 2020. Same author, same idea of small focused repositories, and now four repositories to track.

Running the examples needs mage, goimports and docker at once

The examples are not a single program. Each sub-directory of examples is its own Go module, with compound-component, dom-events, embed-and-translate, fetch-and-display, html-form, simple, vg-for and vg-if among them. To serve them you need three tools installed at once: mage, which now manages both the build and the testing process, goimports, which is often already present through an editor plugin, and docker, because each example is served by its own local nginx container. The documented install for mage is a clone and a bootstrap:

code
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go

and for goimports it is a single go install of golang.org/x/tools/cmd/goimports at latest. One constraint catches people out: mage has to be run from the module root of Vugu, which is the directory holding the top level go.mod.

Every example lands on localhost:8888 under its own directory name

Serving is uniform because the port is uniform. Building and serving every example takes one target:

code
cd path/to/vugu
mage examples

Adding -v for verbose output gives you the second form. Each example is then reachable at a URL built from the directory name, so fetch-and-display becomes http://localhost:8888/fetch-and-display. When you only want one, the target takes the module path rather than the directory name:

code
cd path/to/vugu
mage singleExample github.com/vugu/vugu/example/fetch-and-display

That difference in arguments is where the documentation slips. The URL is derived from the directory name, the single example target is given a module path, and the module path in the example above uses example in the singular while the module naming rule elsewhere says github.com/vugu/vugu/examples/my-new-example with examples plural. Copying the printed command for a new example therefore produces a path that does not match the module the copy step created.

A new example means a directory copy and two path edits in index.html

Adding an example is documented as fairly straightforward, on the condition that you start from one that works. The copy step brings across everything, including the local .gitignore that keeps generated files out of the repository, and the text goes out of its way to ask you to make sure that file survived:

code
cd /path/to/vugu
cp -r ./examples/fetch-and-display/ ./examples/my-new-example

The module name in go.mod then has to be edited to match, which the README calls critical. Two files are off limits: main_wasm.go and wasm_exec.js should not be edited. What is left is index.html, and it needs two separate path changes because it references the example by name in two places. Near line 11 the script tag:

code
<script src="/fetch-and-display/wasm_exec.js"></script>

and near line 29 the WebAssembly call:

code
WebAssembly.instantiateStreaming(fetch("/fetch-and-display/main.wasm"), go.importObject).then((result) => {

Both have to become my-new-example. Miss either one and the page fetches from a path that does not exist.

TinyGo support sits in separate files beside the standard build

The tree shows two parallel implementations rather than one implementation with a switch. Files named comp-key-default.go and comp-key-tinygo.go, misc-default.go and misc-tinygo.go, and mod-check-default.go and mod-check-tinygo.go form matched pairs, so a behaviour difference between the standard toolchain and TinyGo is handled by choosing a file at build time. There is a tinygo-dev directory for that path, and the project roadmap lists TinyGo compilation support among the completed items. Alongside those sit several test suites with different names, wasm-test-suite and legacy-wasm-test-suite, plus staticrender/, domrender/ and simplehttp/ for server side output and serving, and vgform/ and vugufmt/ as the form and formatting tools. A v2 directory sits at the top level as well, next to a module path that carries no major version suffix, which is the arrangement to keep in mind before tagging anything of your own.

The roadmap marks a component library and performance work as unfinished

The README publishes its own checklist, and the open items are informative. Checked off: single file components that look similar to .vue with vugu to go code generation, CSS included in components, flow control through vg-if, vg-for and vg-content, dynamic attributes with a tag and prop expression pair, nested components with dynamic properties, efficient syncing to the browser DOM, static HTML output, DOM events, modification tracking to avoid unnecessary computation, dev and production server tooling, Go only component events, and slots. Server side rendering is checked off with a caveat that it works and needs more documentation and examples. The URL router is checked off but marked in progress in the same line. Still unchecked are the component libraries, marked work in progress, and performance optimizations. Server side rendering being functional but under documented is the item most likely to surprise someone planning to use it, since a checked box reads as finished and the note says otherwise. The README itself describes the project as still a work in progress where some things already work really well, and the badge in its header is the experimental stability marker.

Editorial conclusion

Vugu is worth a look if writing your frontend in Go matters more to you than shipping today, and worth caution if you need a component library or performance work already done, since both sit unchecked on the project's own roadmap. Read the version floor first: the go.mod pins go 1.22.3 for the loop changes in Go 1.22, so an older toolchain will not build it at all. Know that there are no GitHub releases, so there is no tagged version to depend on and master is the only reference point, and note that the three sibling dependencies are pinned to pseudo-versions from 2019 and 2020, which is where upgrade risk sits. The last push is dated 2026-09-23.

Frequently asked questions

What does Vugu compile, and what does it run on?

It compiles .vugu component files into Go and runs the result in a browser through WebAssembly. Component files can include CSS, use vg-if, vg-for and vg-content for flow control, and pass dynamic attributes to tags, all in Vue inspired markup. The module is MIT licensed and its primary language is Go.

What Go version do I need to build Vugu?

Go 1.22.3 or newer. The requirement exists because the library needs the for loop changes introduced in Go 1.22, and the go.mod pins go 1.22.3. Anything older will not compile the module.

How do I run the Vugu examples locally?

Install mage, goimports and docker, then run `mage examples` from the module root of Vugu, the directory holding the top level go.mod. Each example is its own Go module and is served by a local nginx container at a URL of the form http://localhost:8888/fetch-and-display. Use `mage singleExample` with a module path to serve just one.

Official sources

  1. Issues
  2. License: MIT
  3. Project website
  4. README
  5. vugu/vugu on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/vugu-vugu.svg)](https://hysenlabs.com/projects/vugu-vugu)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/vugu-vugu.svg)](https://hysenlabs.com/projects/vugu-vugu)

Was this useful?