Building Applications
Wails v3 uses Task as its build system. The wails3 build and wails3 package commands are convenient wrappers around Task.
Building
Section titled “Building”Build for the current platform:
wails3 buildBuild for a specific platform:
wails3 build GOOS=windowswails3 build GOOS=darwinwails3 build GOOS=linux
# With architecturewails3 build GOOS=darwin GOARCH=arm64
# Environment variable style works tooGOOS=windows wails3 buildOutput goes to the bin/ directory.
Development
Section titled “Development”Run your application with hot reload:
wails3 devThis starts a file watcher that rebuilds and restarts your app on changes. The frontend dev server runs on port 9245 by default.
# Custom portwails3 dev -port 3000
# Enable HTTPSwails3 dev -sPackaging
Section titled “Packaging”Package your app for distribution:
wails3 packagewails3 package GOOS=windowswails3 package GOOS=darwinwails3 package GOOS=linuxThis creates platform-specific packages:
- Windows: NSIS installer — see Windows Packaging
- macOS: Application bundle (
.app) — see macOS Packaging - Linux: AppImage, deb, and rpm — see Linux Packaging
Custom Build Tags
Section titled “Custom Build Tags”Pass custom Go build tags with the -tags flag:
# Build with experimental GTK4 support on Linuxwails3 build -tags gtk4
# Build in server mode (no GUI, CGO-free)wails3 build -tags server
# Combine multiple tagswails3 build -tags gtk4,customtagTags are forwarded as EXTRA_TAGS to the underlying Taskfile. See Server Build and Linux Packaging - GTK4 for details.
Using Task Directly
Section titled “Using Task Directly”For more control, use Task directly:
# List available taskswails3 task --list
# Verbose outputwails3 task build -v
# Dry runwails3 task --dry
# Force rebuildwails3 task build -f
# Pass variableswails3 task darwin:build ARCH=amd64Platform-specific tasks like linux:create:deb or darwin:build:universal are only available through Task.
Generating Assets
Section titled “Generating Assets”Regenerate icons or update build configuration:
wails3 generate icons -input build/appicon.pngwails3 update build-assets -name "MyApp" -config build/config.yml -dir build