$ show wailsapp/wails
Wails is a Go framework for building cross-platform desktop applications using web frontends (HTML/CSS/JS). It provides a CLI tool for project scaffolding, development server, and building. The architecture consists of a Go backend that communicates with an embedded WebView via a binding system that auto-generates TypeScript/JavaScript wrappers for Go services. It supports Windows (WebView2), macOS (WebKit), Linux (GTK/WebKit), and mobile (iOS/Android). Key entry points include `application.New()` in v3 and `wails.Run()` in v2. External dependencies include the WebView2 runtime on Windows, WebKitGTK on Linux, Cocoa on macOS, and various system libraries. The repository contains both v2 (legacy) and v3 (current) versions, with v3 introducing a new binding generator, built-in task runner (`wake`), improved service lifecycle, and cross-platform scaffolding.
The LLM identified 5 files worth highlighting for reuse:
A collection of generic slice and map helper functions (Associate, Contains, Find, Keys, Must, Ternary, Without, etc.) implemented in Go 1.18+ generics. This package is fully self-contained, has no internal dependencies, and can be extracted into any Go project to reduce boilerplate for common data structure operations.
A custom task runner that parses Taskfile YAML, resolves a dependency graph with cycle detection, expands template variables, and executes tasks with precondition checks and incremental caching. It is self-contained with its own AST and execution engine, demonstrating non-obvious skill in DAG orchestration and build system design.
A self-update mechanism for desktop applications that supports pluggable providers (e.g., GitHub releases), semver comparison, signature verification, atomic binary replacement, and detached process spawning with Windows job object breakaway. It is isolated from the core framework and can be reused in any Go desktop application.
A generic pattern for registering Go objects as COM interfaces using vtbl structs and trampoline functions. This package demonstrates deep Windows COM interop skill, handling reference counting, interface queries, and method dispatch via raw syscalls. The pattern is reusable for any COM-based integration in Go.
A generic circular buffer (ring queue) with dynamic resizing, implemented using Go generics. It is a small, self-contained data structure that can be extracted and used in any project requiring a fixed-capacity FIFO queue with automatic expansion.