If you've ever wanted to write a UI not in JS but pure Go... and run it in your browser, right now... That (experimental;) future is here!
Introducing Vugu, a VueJS-inspired library in Go targeting wasm.
No node. No JS. No npm. No node_modules folder competing with your music library for disk space.
- Runs in-browser using WebAssembly
- Single-file components
- Vue-like markup syntax
- Write idiomatic Go code
- Rapid prototyping
- ~3 minute setup
- Standard Go build tools
Get started: http://www.vugu.org/doc/start
Still a work in progress, but a lot of things are already functional. Some work really well.
- Single-file components (looks similar to .vue); .vugu -> .go code generation.
- Includes CSS in components.
- Basic flow control with vg-if, vg-for and output with vg-html.
- Dynamic attributes with
- Nested components with dynamic properties
- Efficently syncs to browser DOM.
- Static HTML output (great for tests).
- DOM Events, click, etc.
- Basic data hashing to avoid unnecessary computation where possible.
- Basic dev and prod server tooling, easy to get started
- URL Router
- Server-side rendering (HTML generation works, needs URL Router to make it usable)
- Performance optimizations
- Go-only component events
- And much more...