What is Vugu?

Inspired by tools like Vue and React, Vugu is a small library written enitrely in Go and able to run in modern browsers using WebAssembly.

Vugu is Go library which makes it easy to write web user interfaces in Go.

The basic idea is as follows:

  • You write UI components in .vugu files. These files are similar to UI components you might see in JavaScript frameworks (e.g. .vue files). However, they contain no JavaScript and instead have Go language expressions for if, for and other such functionality.

  • Each .vugu file is converted to a corresponding .go file. There is a development server in the Vugu project which can do this for you automatically on page reload, or the vugugen command line tool can be used to integrate with go generate. The code generation also attempts to provide sensible defaults where needed so your .vugu files contain as little boilerplate as possible, while still allowing extensive customization if desired.

  • Your project is compiled to a WebAssembly module and run in the browser. Again, the development server makes this easy to do when starting a project. As your project evolves and you need to customize parts of this process you can easily do so.

  • The Vugu library (package: provides functionality to efficiently synchronize HTML DOM on a web page according to the markup in your .vugu files. Features like attaching DOM event handlers (click, etc.) and breaking large pages up into components are supported.

Read more…

Buy me a coffee

comments powered by Disqus