Back to articles
Wails Has a Free API: Build Desktop Apps With Go and Any Frontend Framework

Wails Has a Free API: Build Desktop Apps With Go and Any Frontend Framework

via Dev.to WebdevAlex Spinov

Wails is a framework for building desktop applications using Go for the backend and web technologies for the frontend. Like Tauri but for Go developers — it uses the OS webview for tiny binaries. Why Wails? Go backend — full power of Go standard library + ecosystem Any frontend — React, Vue, Svelte, Lit, vanilla JS Small binaries — ~8MB (vs Electron's 150MB) Native menus — OS-native menus, dialogs, file pickers Cross-platform — Windows, macOS, Linux Install & Create go install github.com/wailsapp/wails/v2/cmd/wails@latest # Create project (React template) wails init -n my-app -t react-ts cd my-app # Dev mode with live reload wails dev # Build wails build Go Backend (Exposed to Frontend) // app.go package main import ( "context" "fmt" "os" ) type App struct { ctx context . Context } func NewApp () * App { return & App {} } func ( a * App ) startup ( ctx context . Context ) { a . ctx = ctx } // Exposed to frontend automatically! func ( a * App ) Greet ( name string ) string { return fmt

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles