> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/dolphin-emu/dolphin/llms.txt
> Use this file to discover all available pages before exploring further.

# Contribution Guidelines

> Learn how to contribute to Dolphin Emulator following our coding standards and legal requirements

## Overview

Welcome to the Dolphin Emulator project! This guide details how to properly contribute code to the project, including legal requirements, coding standards, and best practices.

<Note>
  Following these guidelines will help get your pull request merged faster, assuming the code itself has no mistakes.
</Note>

## Legal Requirements

### Trade Secrets

Following all relevant laws is of utmost importance for an emulation project like Dolphin.

<Warning>
  If you know any confidential information related to the GameCube, Wii, or Triforce (either because you signed an NDA or looked at leaked materials), **do not contribute code to Dolphin at all**.
</Warning>

While accepting code from contributors who know confidential information is legal if the code is unrelated to the confidential information, we refuse to accept code from such contributors because it:

* Greatly increases our review burden
* Increases the legal risk we take

<Warning>
  Piracy is strictly forbidden both on GitHub and in all other Dolphin channels.
</Warning>

### Code Licensing

If you make any contributions to Dolphin after December 1st, 2014, you are agreeing that any code you have contributed will be licensed under the **GNU GPL version 2** (or any later version).

## Code of Conduct

Dolphin is a collaborative open source community comprised of a diverse group of contributors and users from around the globe. We ask all participants to adhere to our Code of Conduct.

### Core Principles

<Steps>
  <Step title="Be friendly and patient">
    We were all new or suffered from a lack of knowledge at one point in time. Please try to remember what it felt like to be on that end, and treat people accordingly.
  </Step>

  <Step title="Be welcoming">
    We strive to be a community that welcomes and supports people of all backgrounds and identities.
  </Step>

  <Step title="Be helpful">
    By helping others to learn, our entire ecosystem is enriched. We encourage mentoring and raising the general level of knowledge in the community.
  </Step>

  <Step title="Be considerate">
    Your work will be used by other people, and you in turn will depend on the work of others. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.
  </Step>

  <Step title="Be respectful">
    Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We cannot allow frustration to turn into a personal attack.
  </Step>
</Steps>

### Unacceptable Behavior

Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to:

* Violent threats or language directed against another person
* Discriminatory jokes and language
* Posting sexually explicit or violent material
* Doxing (posting other people's personally identifying information)
* Personal insults, especially those using racist, sexist, or otherwise discriminatory terms
* Deliberately referring to others by names or pronouns counter to their identity
* Unwelcome sexual attention
* Repeated harassment of others

### Reporting Violations

<Info>
  If you feel that someone is in violation of the code of conduct, please email a detailed description to [conduct@dolphin-emu.org](mailto:conduct@dolphin-emu.org).
</Info>

### Consequences

Except in flagrant or otherwise egregious cases, the first infraction will result in a verbal warning. Continued infractions may lead to:

* Temporary suspension from one or all avenues of Dolphin community participation (IRC, Discord, GitHub, Forums)
* Permanent suspension from participating in the Dolphin community

## Getting Started

### Before Contributing

<Steps>
  <Step title="Read the documentation">
    Familiarize yourself with the codebase structure and our [coding style](/contributing/code-style) guidelines.
  </Step>

  <Step title="Check existing issues">
    Look for existing GitHub issues or discussions related to your planned contribution.
  </Step>

  <Step title="Set up your environment">
    Configure your development environment with the required tools, including clang-format 19.1.
  </Step>

  <Step title="Follow the workflow">
    Create a fork, make your changes, test thoroughly, and submit a pull request.
  </Step>
</Steps>

### Pull Request Process

1. Ensure your code follows the [C++ coding style](/contributing/code-style)
2. Run clang-format on all modified files
3. Add or update [tests](/contributing/testing) for your changes
4. Write a clear commit message describing the changes
5. Submit your pull request with a detailed description

<Note>
  In case of conflicts between the coding style guide and clang-format rules, follow clang-format.
</Note>

## Technology Requirements

### Language Standards

The codebase currently uses **C++20**, though not all compilers support all C++20 features.

<Info>
  See `CMakeLists.txt` "Enforce minimum compiler versions" for the currently supported compilers.
</Info>

### Platform Support

Dolphin supports multiple platforms:

* **Windows**: Use UNIX-style line endings (configure git appropriately)
* **Linux**: Native development environment
* **macOS**: Native development environment
* **Android**: Follow Kotlin code style for Kotlin code, use the provided Java code style for Java

## Getting Help

If you have any questions about Dolphin's development or would like some help:

* **IRC**: `#dolphin-emu @ irc.libera.chat`
* **Documentation**: Check the [Libera.Chat resources](https://libera.chat/) if new to IRC
* **GitHub**: Create a discussion or issue for general questions

## Next Steps

<CardGroup cols={2}>
  <Card title="Code Style" icon="code" href="/contributing/code-style">
    Learn about C++ coding standards and formatting
  </Card>

  <Card title="Testing" icon="flask" href="/contributing/testing">
    Understand our testing practices and frameworks
  </Card>

  <Card title="Debugging" icon="bug" href="/contributing/debugging">
    Explore debugging tools and techniques
  </Card>
</CardGroup>
