lightpanda-browser

Contributing

Lightpanda Browser is an open-source project that welcomes contributions from the community. This guide covers everything you need to know to contribute effectively, from signing the Contributor License Agreement to submitting your first pull request.

Prerequisites

Before contributing, make sure you have a working development environment:

Contributor License Agreement (CLA)

All contributors must sign the Lightpanda Contributor License Agreement before their first contribution can be accepted. The CLA is based on the Apache Software Foundation Contributor License Agreement and protects both you as a contributor and the project.

What the CLA Covers

The CLA grants Lightpanda (Selecy SAS) a license to use your contributions while you retain all rights to your own work. Specifically:

How to Sign

The CLA signing process is automated through CLA Assistant Lite:

  1. Open a pull request on the Lightpanda Browser repository
  2. The CLA Assistant bot will comment on your PR asking you to sign
  3. Reply with the comment: I have read the CLA Document and I hereby sign the CLA
  4. The bot records your signature and the check passes

You only need to sign the CLA once. All subsequent pull requests will be automatically approved.

Corporate Contributors

If you are contributing on behalf of your employer, ensure that:

Any individual who makes a contribution from an account associated with a corporate entity is considered authorized to contribute on that entity’s behalf.

Third-Party Work

If you want to submit work that is not your original creation, submit it separately from your contribution. Include:

Setting Up Your Development Environment

  1. Fork the repository on GitHub
  2. Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/browser.git
cd browser
  1. Add the upstream remote:
git remote add upstream https://github.com/lightpanda-io/browser.git
  1. Install dependencies and build the project (see Building from Source for detailed instructions):
make build-dev
  1. Run the test suite to verify your setup:
make test

Making a Contribution

Step 1: Create a Branch

Create a feature branch from the latest main:

git fetch upstream
git checkout -b my-feature upstream/main

Step 2: Write Your Code

Lightpanda is written in Zig. Follow these guidelines:

Step 3: Run Checks Locally

Before pushing, run the formatter and tests:

zig fmt --check ./*.zig ./**/*.zig
make test

Step 4: Push and Open a Pull Request

git push origin my-feature

Then open a pull request on GitHub against the main branch of lightpanda-io/browser.

Pull Request Guidelines

Writing a Good PR

CI Pipeline

Every pull request triggers several automated checks:

Check Description
zig fmt Verifies code formatting compliance
zig test Runs the unit test suite
E2E tests Runs end-to-end integration tests
WPT Runs Web Platform Tests for standards compliance
CLA Verifies the contributor has signed the CLA

All checks must pass before a pull request can be merged. If a check fails, review the CI logs, fix the issue, and push an update.

Draft Pull Requests

CI checks are skipped for draft pull requests. Use draft PRs when:

Mark your PR as “Ready for review” when all changes are complete.

Code Review

All contributions go through code review by the Lightpanda maintainers. To facilitate a smooth review:

Licensing

Lightpanda Browser is licensed under AGPL-3.0-only. By contributing, you agree that your contributions will be licensed under the same terms.

Exceptions

The following directories are licensed under their original upstream licenses rather than AGPL-3.0:

When contributing code to these directories, be mindful of their respective license requirements.

Types of Contributions

Bug Reports

File bug reports as GitHub issues. Include:

Feature Requests

Open a GitHub issue to discuss new features before starting implementation. This helps ensure alignment with the project’s direction and avoids duplicate work.

Code Contributions

Code contributions can include:

Documentation

Documentation improvements are welcome. This includes fixing typos, clarifying explanations, or adding missing information.

Getting Help

Next Steps