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.Following these guidelines will help get your pull request merged faster, assuming the code itself has no mistakes.
Legal Requirements
Trade Secrets
Following all relevant laws is of utmost importance for an emulation project like Dolphin. 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
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
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.
Be welcoming
We strive to be a community that welcomes and supports people of all backgrounds and identities.
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.
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.
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
If you feel that someone is in violation of the code of conduct, please email a detailed description to [email protected].
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
Read the documentation
Familiarize yourself with the codebase structure and our coding style guidelines.
Check existing issues
Look for existing GitHub issues or discussions related to your planned contribution.
Set up your environment
Configure your development environment with the required tools, including clang-format 19.1.
Pull Request Process
- Ensure your code follows the C++ coding style
- Run clang-format on all modified files
- Add or update tests for your changes
- Write a clear commit message describing the changes
- Submit your pull request with a detailed description
In case of conflicts between the coding style guide and clang-format rules, follow clang-format.
Technology Requirements
Language Standards
The codebase currently uses C++20, though not all compilers support all C++20 features.See
CMakeLists.txt “Enforce minimum compiler versions” for the currently supported compilers.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 if new to IRC
- GitHub: Create a discussion or issue for general questions
Next Steps
Code Style
Learn about C++ coding standards and formatting
Testing
Understand our testing practices and frameworks
Debugging
Explore debugging tools and techniques