ConfigsApr 12, 2026·1 min read

Wails — Build Desktop Apps with Go and Web Technologies

Wails lets you create beautiful desktop applications using Go for the backend and any web frontend. Uses the OS native WebView (like Tauri) producing ~8MB binaries. No Electron bloat, full Go power, and access to native APIs via bindings.

AI
AI Open Source · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

go install github.com/wailsapp/wails/v2/cmd/wails@latest
wails init -n myapp -t svelte-ts
cd myapp
wails dev                    # Hot-reload dev mode
wails build                  # Production binary

Go backend:

type App struct { ctx context.Context }

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

Svelte frontend:

<script lang="ts">
import { Greet } from "../wailsjs/go/main/App";
let result = "";
async function greet() {
    result = await Greet("William");
}
</script>
<button on:click={greet}>{result || "Click me"}</button>
Intro

Wails lets you build beautiful desktop applications using Go for the backend and any web frontend (React, Vue, Svelte, etc.). Like Tauri but for Go developers. Uses the OS native WebView instead of bundling Chromium, producing ~8MB binaries. Created by Lea Anthony.

What Wails Does

  • Go backend — full Go power for business logic
  • Web frontend — React, Vue, Svelte, Lit, vanilla
  • OS WebView — WebKit (macOS/Linux), WebView2 (Windows)
  • Auto-bindings — Go functions callable from JS
  • Events — Go ↔ JS event system
  • Menus — native application menus
  • Dialogs — open/save file, message box
  • Hot reloadwails dev for live development
  • Cross-compile — build for all platforms

Comparison

Framework Backend Binary Size
Wails Go ~8MB
Tauri Rust ~3-10MB
Electron Node.js ~150MB
Neutralino C++ ~2MB

常见问题 FAQ

Q: Wails vs Tauri? A: 同样理念(OS WebView + 非 JS 后端),Wails 用 Go,Tauri 用 Rust。Go 更易上手,Rust 更底层更安全。选熟悉的语言。

来源与致谢 Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets