
Wails v2 Has a Free API: Build Lightweight Desktop Apps with Go and Web Technologies
What is Wails? Wails lets you build desktop applications using Go for the backend and any web framework for the frontend . Think Electron, but with Go instead of Node.js — resulting in binaries that are 10-50x smaller and use significantly less memory. Quick Start go install github.com/wailsapp/wails/v2/cmd/wails@latest wails init -n myapp -t react-ts cd myapp wails dev You get a native desktop app with React + TypeScript frontend and Go backend, with hot reload. How It Works Wails binds Go functions directly to JavaScript — no REST API, no WebSocket, no IPC boilerplate: // app.go package main import "context" type App struct { ctx context . Context } func NewApp () * App { return & App {} } func ( a * App ) startup ( ctx context . Context ) { a . ctx = ctx } // This function is callable from JavaScript! func ( a * App ) Greet ( name string ) string { return "Hello " + name + "!" } // Complex types work too type FileInfo struct { Name string `json:"name"` Size int64 `json:"size"` Path
Continue reading on Dev.to Tutorial
Opens in a new tab


