docs/src/content/docs/contributing/setup.mdx
This guide walks you through setting up a complete development environment for working on Wails v3.
Install Go 1.25 or later:
# Download from https://go.dev/dl/
go version # Verify installation
Configure Go environment:
# Add to your shell profile (.bashrc, .zshrc, etc.)
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Install useful Go tools:
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
Required for building documentation and testing frontend integrations.
# Install Node.js 20+ and npm
node --version # Should be 20+
npm --version
macOS:
# Install Xcode Command Line Tools
xcode-select --install
# Verify installation
xcode-select -p # Should output a path
Windows:
Linux (Debian/Ubuntu):
sudo apt update
# Default GTK4 + WebKitGTK 6.0 stack (Ubuntu 24.04+ / Debian 13+)
sudo apt install build-essential pkg-config libgtk-4-dev libwebkitgtk-6.0-dev
# For the legacy -tags gtk3 path:
sudo apt install libgtk-3-dev libwebkit2gtk-4.1-dev
Linux (Fedora/RHEL):
# Default GTK4 stack
sudo dnf install gcc pkg-config gtk4-devel webkitgtk6.0-devel
# Legacy GTK3 path:
sudo dnf install gtk3-devel webkit2gtk4.1-devel
Linux (Arch):
# Default GTK4 stack
sudo pacman -S base-devel gtk4 webkitgtk-6.0
# Legacy GTK3 path:
sudo pacman -S gtk3 webkit2gtk-4.1
# Clone your fork
git clone https://github.com/YOUR_USERNAME/wails.git
cd wails
# Add upstream remote
git remote add upstream https://github.com/wailsapp/wails.git
# Verify remotes
git remote -v
# Navigate to v3 directory
cd v3
# Build the CLI
go build -o ../wails3 ./cmd/wails3
# Test the build
cd ..
./wails3 version
Linux/macOS:
# Add to ~/.bashrc or ~/.zshrc
export PATH=$PATH:/path/to/wails
Windows:
Add the Wails directory to your PATH environment variable through System Properties.
Install VS Code: Download
Install extensions:
Configure workspace settings (.vscode/settings.json):
{
"go.useLanguageServer": true,
"go.lintTool": "golangci-lint",
"go.lintOnSave": "workspace",
"editor.formatOnSave": true,
"go.formatTool": "goimports"
}
Install GoLand: Download
Configure:
goimportsRun these commands to verify everything is working:
# Go version check
go version
# Build Wails
cd v3
go build ./cmd/wails3
# Run tests
go test ./pkg/...
# Create a test app
cd ..
./wails3 init -n mytest -t vanilla
cd mytest
../wails3 dev
If the test app builds and runs, your environment is ready!
cd v3
go test ./...
go test ./pkg/application
go test ./pkg/events -v # Verbose output
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out
go test ./... -race
The Wails documentation is built with Astro and Starlight.
cd docs
# Install dependencies
npm install
# Start dev server
npm run dev
# Build for production
npm run build
Documentation will be available at http://localhost:4321/
VS Code:
Create .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Wails CLI",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/v3/cmd/wails3",
"args": ["dev"]
}
]
}
Command Line:
# Use Delve debugger
go install github.com/go-delve/delve/cmd/dlv@latest
dlv debug ./cmd/wails3 -- dev
Platform-specific debugging requires platform tools:
Add the Wails directory to your PATH or use ./wails3 from the project root.
Install the development packages for whichever stack you're building against:
# Default GTK4 stack (Debian/Ubuntu):
sudo apt install libwebkitgtk-6.0-dev
# Legacy GTK3 path:
sudo apt install libwebkit2gtk-4.1-dev
cd v3
go mod tidy
go mod download
Ensure you have a C compiler (MinGW-w64 via MSYS2) in your PATH.