Getting Started
Welcome, Contributor!
Section titled “Welcome, Contributor!”Thank you for your interest in contributing to Wails! This guide will help you make your first contribution.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have:
- Go 1.25+ installed (download)
- Node.js 20+ and npm (download)
- Git configured with your GitHub account
- Basic familiarity with Go and JavaScript/TypeScript
Platform-Specific Requirements
Section titled “Platform-Specific Requirements”macOS:
- Xcode Command Line Tools:
xcode-select --install
Windows:
- MSYS2 or similar Unix-like environment recommended
- WebView2 runtime (usually pre-installed on Windows 11)
Linux:
gcc,pkg-config,libgtk-3-dev,libwebkit2gtk-4.0-dev- Install via:
sudo apt install build-essential pkg-config libgtk-3-dev libwebkit2gtk-4.0-dev(Debian/Ubuntu)
Contribution Process Overview
Section titled “Contribution Process Overview”The typical contribution workflow follows these steps:
- Fork & Clone - Create your own copy of the Wails repository
- Setup - Build the Wails CLI and verify your environment
- Branch - Create a feature branch for your changes
- Develop - Make your changes following our coding standards
- Test - Run tests to ensure everything works
- Commit - Commit with clear, conventional commit messages
- Submit - Open a pull request for review
- Iterate - Respond to feedback and make adjustments
- Merge - Once approved, your changes become part of Wails!
Step-by-Step Guide
Section titled “Step-by-Step Guide”Choose your contribution type:
-
Find or Report the Bug
- Check if the bug is already reported in GitHub Issues
- If not, create a new issue with steps to reproduce
- Wait for confirmation before starting work
-
Fork and Clone
Fork the repository at github.com/wailsapp/wails/fork
Clone your fork:
Terminal window git clone https://github.com/YOUR_USERNAME/wails.gitcd wailsgit remote add upstream https://github.com/wailsapp/wails.git -
Build and Verify
Build Wails and verify you can reproduce the bug:
Terminal window cd v3go build -o ../wails3 ./cmd/wails3# Reproduce the bug to understand it -
Create a Bug Fix Branch
Create a branch for your fix:
Terminal window git checkout -b fix/issue-123-window-crash -
Fix the Bug
- Make the minimal changes needed to fix the bug
- Don’t refactor unrelated code
- Add or update tests to prevent regression
Terminal window # Make your changes# Add tests in *_test.go files -
Test Your Fix
Run tests to ensure the fix works:
Terminal window go test ./...# Test the specific packagego test ./pkg/application -v# Run with race detectorgo test ./... -race -
Commit Your Fix
Commit with a clear message:
Terminal window git commit -m "fix: prevent window crash when closing during initializationFixes #123" -
Submit Pull Request
Push and create PR:
Terminal window git push origin fix/issue-123-window-crashIn your PR description:
- Explain the bug and root cause
- Describe your fix
- Reference the issue: “Fixes #123”
- Include before/after behavior
-
Respond to Feedback
Address review comments and update your PR as needed.
-
Discuss the Feature
- Open a GitHub Discussion or issue
- Describe what you want to add and why
- Wait for maintainer feedback before implementing
- Ensure it aligns with Wails’ goals
-
Fork and Clone
Fork the repository at github.com/wailsapp/wails/fork
Clone your fork:
Terminal window git clone https://github.com/YOUR_USERNAME/wails.gitcd wailsgit remote add upstream https://github.com/wailsapp/wails.git -
Setup Development Environment
Build Wails and verify your environment:
Terminal window cd v3go build -o ../wails3 ./cmd/wails3# Run tests to ensure everything worksgo test ./... -
Create a Feature Branch
Create a descriptive branch:
Terminal window git checkout -b feat/window-transparency-support -
Implement the Feature
- Follow our Coding Standards
- Keep changes focused on the feature
- Write clean, documented code
- Add comprehensive tests
Terminal window # Example: Adding a new window method# 1. Add to window.go interface# 2. Implement in platform files (darwin, windows, linux)# 3. Add tests# 4. Update documentation -
Test Thoroughly
Test your feature:
Terminal window # Unit testsgo test ./pkg/application -v# Integration test - create a test appcd .../wails3 init -n feature-testcd feature-test# Add code using your new feature../wails3 dev -
Document Your Feature
- Add docstrings to all public APIs
- Update relevant documentation in
/docs - Add examples if applicable
-
Commit with Convention
Use conventional commits:
Terminal window git commit -m "feat: add window transparency support- Add SetTransparent() method to Window API- Implement for macOS, Windows, and Linux- Add tests and documentationCloses #456" -
Submit Pull Request
Push and create PR:
Terminal window git push origin feat/window-transparency-supportIn your PR:
- Describe the feature and use cases
- Show examples or screenshots
- List any breaking changes
- Reference the discussion/issue
-
Iterate Based on Review
Maintainers may request changes. Be patient and collaborative.
-
Identify Documentation Needs
- Found outdated docs while using Wails?
- Notice missing examples or explanations?
- Want to fix typos or improve clarity?
- Check documentation issues
-
Fork and Clone
Fork the repository at github.com/wailsapp/wails/fork
Clone your fork:
Terminal window git clone https://github.com/YOUR_USERNAME/wails.gitcd wailsgit remote add upstream https://github.com/wailsapp/wails.git -
Setup Documentation Environment
The docs are in
/docsand built with Astro:Terminal window cd docsnpm installnpm run devOpen http://localhost:4321/ to preview changes live.
-
Create a Documentation Branch
Create a branch for your changes:
Terminal window git checkout -b docs/improve-window-api-examples -
Make Your Changes
Documentation files are in
/docs/src/content/docs/:Terminal window # Edit MDX files# Check the preview in your browser# Ensure formatting is correctBest Practices:
- Use clear, concise language
- Include practical code examples
- Add links to related sections
- Check spelling and grammar
- Test all code examples
-
Verify Your Changes
Check the live preview and ensure:
- Links work correctly
- Code examples are accurate
- Formatting renders properly
- No broken images or references
-
Commit Documentation Changes
Commit with clear message:
Terminal window git commit -m "docs: add practical examples to Window API guide- Add window positioning examples- Include common patterns section- Fix broken links to Event API" -
Submit Pull Request
Push and create PR:
Terminal window git push origin docs/improve-window-api-examplesIn your PR:
- Describe what docs you improved
- Explain why the change helps users
- Include screenshots if visual changes
-
Address Review Feedback
Documentation PRs are usually quick to review and merge!
Finding Issues to Work On
Section titled “Finding Issues to Work On”- Look for
good first issuelabels - Check
help wantedissues - Browse open issues and ask to be assigned
Getting Help
Section titled “Getting Help”- Discord: Join Wails Discord
- Discussions: Post in GitHub Discussions
- Issues: Open an issue if you find a bug or have a question
Code of Conduct
Section titled “Code of Conduct”Be respectful, constructive, and welcoming. We’re building a friendly community focused on creating great software together.
Next Steps
Section titled “Next Steps”- Set up your Development Environment
- Review our Coding Standards
- Explore the Technical Documentation