Skip to content

VukaGo, with a few things more

Result, the ? operator, match, enums and decorators, plus a web framework where pages are files and the UI stays live. It compiles to plain Go.

Vuka

Try it ​

With Go 1.25 or newer:

sh
go install github.com/vuka-lang/vuka/cmd/vuka/v2@latest
vuka new hello && cd hello
vuka run

For your editor, install the Vuka extension from the VS Code Marketplace or Open VSX. Other editors use vuka lsp; see Editors.

A taste ​

Errors as values, decorators and match, in a .vuka file:

vuka
func lookup(arg string) Result[User] {
	id := strconv.Atoi(arg)?          // Go's (T, error) works directly
	u := find(id)?
	return Ok(u)
}

@retry(3)
@logged
func charge(ctx context.Context, id int) (Receipt, error) { … }

match lookup(arg) {
case Ok(u):
	fmt.Println(u.Name)
case Err(&NotFound{ID: id}):
	fmt.Println("missing user", id)
case Err(e) if errors.Is(e, strconv.ErrSyntax):
	fmt.Println("not a number:", arg)
case Err(e):
	fmt.Println("error:", e)
}

A live page, pages/counter/index.vuka.html, served at /counter. Each click runs Add on the server and patches the count in place:

html
<script lang="go">
package counter

import "github.com/vuka-lang/ui/v2"

type Index struct {
	ui.Live
	count int
}

func (p *Index) Add() { p.count++ }
</script>

<main>
  <h1>{count}</h1>
  <button onClick={Add}>Add one</button>
</main>

Built on Go ​

Vuka stands on the work of the Go team. It doesn't have a parser or type checker of its own for Go: it finds its own additions token by token, rewrites them into Go, and leaves everything else to go/parser, go/types and the go command of the toolchain you have installed. The editor support is gopls behind a proxy. What Vuka adds is small on purpose; the language underneath is Go, and the credit for it belongs to the Go Authors. See Credits.

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.