Wails 3.0: The Long-Awaited Framework Release for Building Go Desktop AppsArticle · digest for October 31
Minimalist 3D render of the modular Wails 3.0 framework connecting a lightweight native Go engine with a web window.
Article3 sections≈ 5 min

Wails 3.0: The Long-Awaited Framework Release for Building Go Desktop Apps

Building GUI desktop apps in Go has historically felt like walking through a minefield. On one side, you had native C libraries and bindings around Qt or GTK—painful to compile on Windows and macOS, requiring miles of CGO glue and breaking reproducible builds. On the other side sat classic Electron, dragging an entire Chromium instance along for the ride and burning hundreds of megabytes of RAM just to render a timer or log viewer.

That's why the release of Wails 3.0 became the standout engineering event of the fall for thousands of Go backend developers. Wails is MIT-licensed, and the official release notes live in the Wails repository. Version 3.0 is a ground-up architectural rewrite: the authors rebuilt the core from scratch into a flexible toolkit for cross-platform desktop apps powered by a pure Go backend and any modern frontend you like (React, Vue, Svelte, or plain HTML).

Native WebView vs. the Browser Monster

The core philosophical difference between Wails and Electron is using each operating system's native web rendering engine:

  • On Windows, apps use the lightweight Edge-based WebView2 engine.
  • On macOS, they use Apple's built-in WKWebView.
  • On Linux, they use standard WebKitGTK.

As a result, a compiled Wails v3 binary weighs just a handful of megabytes (typically 10–20 MB with all assets bundled), and memory usage starts at a lean 30–50 MB. Meanwhile, inside the Go runtime, you keep the full power of goroutines, channels, raw sockets, and blazing-fast compilation. If you followed how the runtime evolved in Go 1.27, Wails v3 squeezes every ounce of performance out of modern Go.

What's New in Version 3

Wails 2.x had a few stubborn architectural ceilings: apps were tightly bound to a single main window, system tray support was awkward, and exposing Go methods required roundabout workarounds. Wails 3.0 fixes all of that systematically:

  1. True multi-window support: apps can spawn and independently manage any number of windows, settings dialogs, and modal panels with their own geometry, transparency, and window decorations.
  2. First-class System Tray support: notification-area menus with dynamic items, badges, and shortcuts are now declared in a few lines of Go.
  3. Modular plugin architecture: features like desktop notifications, global shortcuts, and logging live in pluggable modules.
  4. Automatic TypeScript binding generation: at build time, Wails inspects your Go structs and services and generates strictly typed client modules so your frontend can call Go functions with full type safety.

Here's how clean a basic Wails v3 app initialization looks in Go:

package main

import (
    "context"
    "fmt"
    "log"

    "github.com/wailsapp/wails/v3/pkg/application"
)

type SystemService struct{}

func (s *SystemService) GetClusterStatus(ctx context.Context, region string) (string, error) {
    // Simulate a fast system health check
    return fmt.Sprintf("Кластер в регионе %s работает стабильно. Активно 14 узлов.", region), nil
}

func main() {
    app := application.New(application.Options{
        Name:        "ClusterMonitor",
        Description: "Системный монитор инфраструктуры",
        Services: []application.Service{
            application.NewService(&SystemService{}),
        },
    })

    app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
        Title:     "Cluster Monitor Pro",
        Width:     1024,
        Height:    768,
        URL:       "/",
    })

    if err := app.Run(); err != nil {
        log.Fatalf("Ошибка запуска приложения Wails: %v", err)
    }
}

Look how concise that is. You define a SystemService struct, register it in Services, and Wails automatically exposes GetClusterStatus to your JavaScript frontend.

And here's the client-side call in React or Vue with full TypeScript types:

import { useState } from 'react';
// Import the typed service auto-generated by Wails v3
import { GetClusterStatus } from '@/bindings/ClusterMonitor/systemservice';

export function StatusWidget() {
  const [status, setStatus] = useState<string>('Загрузка...');

  async function handleRefresh() {
    try {
      const result = await GetClusterStatus('eu-central-1');
      setStatus(result);
    } catch (err) {
      console.error('Ошибка вызова бэкенда Go:', err);
    }
  }

  return (
    <div className="p-4 bg-slate-900 text-white rounded-lg">
      <h3 className="font-semibold text-lg">Состояние инфраструктуры</h3>
      <p className="my-2 text-slate-300">{status}</p>
      <button onClick={handleRefresh} className="px-4 py-2 bg-blue-600 rounded">
        Обновить метрики
      </button>
    </div>
  );
}

Zero hand-rolled REST controllers, zero WebSockets, zero manual JSON serialization: Wails handles argument marshaling and error propagation for you.

What to Keep in Mind in Practice

Even with all the advantages of a native approach, Wails has one practical constraint you should plan around early: cross-compilation. Because Wails links against native OS windowing subsystems (Win32 on Windows, Cocoa on macOS, GTK on Linux), compiling a macOS binary from a Linux machine isn't straightforward without specialized containers packing Clang cross-compilers and Apple SDKs. In production repos, teams typically solve this with a GitHub Actions build matrix running across native virtual machines.

Still, Wails 3.0 proves once and for all that desktop UIs don't have to be bloated monsters devouring gigabytes of RAM. If your team writes Go, there's simply no better tool for shipping fast desktop apps today.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 2