
Wails Has a Free API: Build Desktop Apps in Go With Web Frontends
Electron uses JavaScript for everything. Tauri uses Rust. Wails uses Go — and if you're a Go developer, it's the obvious choice. What Is Wails? Wails builds desktop applications using Go for the backend and any web framework for the frontend. Like Tauri, it uses the OS's native webview instead of bundling Chromium. wails init -n myapp -t svelte-ts cd myapp wails dev Go ↔ Frontend Communication // app.go package main type App struct { ctx context . Context } func ( a * App ) Greet ( name string ) string { return fmt . Sprintf ( "Hello %s, welcome to Wails!" , name ) } func ( a * App ) ReadFile ( path string ) ( string , error ) { data , err := os . ReadFile ( path ) return string ( data ), err } func ( a * App ) FetchURL ( url string ) ( map [ string ] any , error ) { resp , err := http . Get ( url ) if err != nil { return nil , err } defer resp . Body . Close () var result map [ string ] any json . NewDecoder ( resp . Body ) . Decode ( & result ) return result , nil } // Frontend — aut
Continue reading on Dev.to Webdev
Opens in a new tab


