Skip to content

Development Setup

This guide walks you through setting up a complete development environment for working on Wails v3.

  1. Install Go 1.25 or later:

    Terminal window
    # Download from https://go.dev/dl/
    go version # Verify installation
  2. Configure Go environment:

    Terminal window
    # Add to your shell profile (.bashrc, .zshrc, etc.)
    export GOPATH=$HOME/go
    export PATH=$PATH:$GOPATH/bin
  3. Install useful Go tools:

    Terminal window
    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.

Terminal window
# Install Node.js 20+ and npm
node --version # Should be 20+
npm --version

macOS:

Terminal window
# Install Xcode Command Line Tools
xcode-select --install
# Verify installation
xcode-select -p # Should output a path

Windows:

  1. Install MSYS2 for a Unix-like environment
  2. WebView2 Runtime (pre-installed on Windows 11, download for Windows 10)
  3. Optional: Install Git for Windows

Linux (Debian/Ubuntu):

Terminal window
sudo apt update
sudo apt install build-essential pkg-config libgtk-3-dev libwebkit2gtk-4.0-dev

Linux (Fedora/RHEL):

Terminal window
sudo dnf install gcc pkg-config gtk3-devel webkit2gtk3-devel

Linux (Arch):

Terminal window
sudo pacman -S base-devel gtk3 webkit2gtk
Terminal window
# 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
Terminal window
# Navigate to v3 directory
cd v3
# Build the CLI
go build -o ../wails3 ./cmd/wails3
# Test the build
cd ..
./wails3 version

Linux/macOS:

Terminal window
# Add to ~/.bashrc or ~/.zshrc
export PATH=$PATH:/path/to/wails

Windows:

Add the Wails directory to your PATH environment variable through System Properties.

  1. Install VS Code: Download

  2. Install extensions:

    • Go (by Go Team at Google)
    • ESLint
    • Prettier
    • MDX (for documentation)
  3. Configure workspace settings (.vscode/settings.json):

    {
    "go.useLanguageServer": true,
    "go.lintTool": "golangci-lint",
    "go.lintOnSave": "workspace",
    "editor.formatOnSave": true,
    "go.formatTool": "goimports"
    }
  1. Install GoLand: Download

  2. Configure:

    • Enable Go modules support
    • Set up file watchers for goimports
    • Configure code style to match project conventions

Run these commands to verify everything is working:

Terminal window
# 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!

Terminal window
cd v3
go test ./...
Terminal window
go test ./pkg/application
go test ./pkg/events -v # Verbose output
Terminal window
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out
Terminal window
go test ./... -race

The Wails documentation is built with Astro and Starlight.

Terminal window
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:

Terminal window
# Use Delve debugger
go install github.com/go-delve/delve/cmd/dlv@latest
dlv debug ./cmd/wails3 -- dev

Platform-specific debugging requires platform tools:

  • macOS: Xcode Instruments
  • Windows: Visual Studio Debugger
  • Linux: GDB

Add the Wails directory to your PATH or use ./wails3 from the project root.

Install WebKit2GTK development packages:

Terminal window
sudo apt install libwebkit2gtk-4.0-dev # Debian/Ubuntu
Terminal window
cd v3
go mod tidy
go mod download

Ensure you have a C compiler (MinGW-w64 via MSYS2) in your PATH.