Contributing
Contributing
Section titled “Contributing”Thank you for your interest in contributing to ryu_ldn_nx! This guide will help you get started.
Ways to Contribute
Section titled “Ways to Contribute”- Bug Reports - Found an issue? Let us know!
- Feature Requests - Have an idea? We’d love to hear it!
- Code - Submit pull requests with fixes or features
- Documentation - Help improve these docs
- Testing - Test on different games and configurations
Development Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose
- Git
- VS Code (recommended)
Getting Started
Section titled “Getting Started”-
Fork the repository
Terminal window git clone --recursive https://github.com/Ethiquema/ryu_ldn_nx.gitcd ryu_ldn_nx -
Build using Docker
Terminal window # Build sysmoduledocker-compose run --rm build# Run testsdocker-compose run --rm test# Build overlaydocker-compose run --rm overlay
Code Structure
Section titled “Code Structure”ryu_ldn_nx/├── sysmodule/ # Main sysmodule code│ └── source/│ ├── config/ # Configuration parsing│ ├── network/ # Network client│ ├── protocol/ # RyuLdn protocol│ └── ldn/ # LDN MITM service├── overlay/ # Tesla overlay├── tests/ # Unit tests└── docs/ # This documentationCoding Standards
Section titled “Coding Standards”C++ Style
Section titled “C++ Style”- Use C++20 features where appropriate
- Follow existing code style
- Use Doxygen comments for public APIs
- Keep functions focused and small
Naming Conventions
Section titled “Naming Conventions”- Classes:
PascalCase - Functions:
PascalCase(matching Atmosphere style) - Variables:
snake_case - Member variables:
m_snake_case - Constants:
UPPER_SNAKE_CASE
Example
Section titled “Example”/** * @brief Process incoming network data * * @param data Raw data buffer * @param size Size in bytes * @return Result Success or error code */Result NetworkClient::ProcessData(const u8* data, size_t size) { if (data == nullptr || size == 0) { R_THROW(ResultInvalidArgument()); }
// Process the data...
R_SUCCEED();}Testing
Section titled “Testing”Running Tests
Section titled “Running Tests”docker-compose run --rm testWriting Tests
Section titled “Writing Tests”Tests use a simple assertion framework. Add tests to tests/ directory:
void test_my_feature() { // Arrange MyClass instance;
// Act auto result = instance.DoSomething();
// Assert ASSERT_TRUE(result == expected);}Pull Request Process
Section titled “Pull Request Process”-
Create a branch
Terminal window git checkout -b feature/my-feature -
Make your changes
- Write code
- Add tests
- Update documentation
-
Test locally
Terminal window docker-compose run --rm testdocker-compose run --rm build -
Commit with sign-off
Terminal window git commit -s -m "Add my feature" -
Push and create PR
Terminal window git push origin feature/my-feature -
Describe your changes
- What does this PR do?
- How was it tested?
- Any breaking changes?
DCO Sign-Off
Section titled “DCO Sign-Off”We require a Developer Certificate of Origin (DCO) sign-off on commits. This certifies that you wrote or have the right to submit the code.
Add -s to your commit command:
git commit -s -m "Your commit message"This adds a line like:
Signed-off-by: Your Name <your.email@example.com>Getting Help
Section titled “Getting Help”- Open an issue for questions
- Check existing issues and PRs
- Read the Architecture guide