DEV Community

Alex Spinov
Alex Spinov

Posted on

Wails Has a Free Go Framework That Builds Desktop Apps — Like Tauri, But for Go Developers

The Go Desktop Problem

Go is great for servers. But when you need a desktop app, your options are:

  • Electron (200MB hello world)
  • Fyne (custom rendering, looks non-native)
  • CGo bindings to Qt/GTK (dependency hell)

Wails gives Go developers Tauri-like desktop apps. Go backend + web frontend. 5-10MB binaries.

What Wails Gives You

Call Go From JavaScript

// app.go
type App struct {
    ctx context.Context
}

func (a *App) Greet(name string) string {
    return fmt.Sprintf("Hello %s!", name)
}

func (a *App) ReadFile(path string) (string, error) {
    data, err := os.ReadFile(path)
    return string(data), err
}
Enter fullscreen mode Exit fullscreen mode
// Frontend — auto-generated TypeScript bindings!
import { Greet, ReadFile } from '../wailsjs/go/main/App';

const message = await Greet('World');
const content = await ReadFile('/etc/hostname');
Enter fullscreen mode Exit fullscreen mode

Wails generates TypeScript declarations from your Go code. Full type safety across the bridge.

Events System

// Go side — emit events
runtime.EventsEmit(a.ctx, "file-processed", filename)

// JavaScript side — listen
runtime.EventsOn("file-processed", (filename) => {
    console.log(`Processed: ${filename}`);
});
Enter fullscreen mode Exit fullscreen mode

Native Menus & Dialogs

menu := application.NewMenu()
fileMenu := menu.AddSubmenu("File")
fileMenu.Add("Open").OnClick(func(ctx *application.Context) {
    file, _ := runtime.OpenFileDialog(ctx, runtime.OpenDialogOptions{
        Title: "Select File",
    })
})
Enter fullscreen mode Exit fullscreen mode

Auto-Generated TypeScript Models

type User struct {
    Name  string `json:"name"`
    Email string `json:"email"`
}
Enter fullscreen mode Exit fullscreen mode

Wails generates matching TypeScript types. Change the Go struct, the frontend type updates automatically.

Quick Start

go install github.com/wailsapp/wails/v2/cmd/wails@latest
wails init -n myapp -t svelte-ts
cd myapp
wails dev
Enter fullscreen mode Exit fullscreen mode

Works with React, Vue, Svelte, or vanilla JS.

Why This Matters

Go developers deserve desktop app tooling as good as what Rust developers get with Tauri. Wails delivers exactly that — fast builds, tiny binaries, and a bridge that feels native to both languages.


Building data-driven desktop tools? Check out my web scraping actors on Apify Store — feed structured data into your Go apps. For custom solutions, email spinov001@gmail.com.

Top comments (0)