Thank you for your interest in contributing to BinaryRPC! This document provides guidelines and information for contributors.
- Fork the repository
- Clone your fork locally
- Create a feature branch
- Make your changes
- Test your changes thoroughly
- Submit a pull request
- C++20 compatible compiler (GCC 10+, Clang 12+, MSVC 2019+)
- CMake 3.16 or higher
- vcpkg for dependency management
- Python 3.8+ (for integration tests)
# Clone the repository
git clone https://github.com/your-username/binaryrpc.git
cd binaryrpc
cmake --preset development
cmake --build .
# Run tests
ctest --output-on-failure# Unit tests
cd build
ctest -R unit_tests
# Integration tests
cd tests/integration_tests_py
python -m pytest
# Memory leak tests
cd tests/Memory_leak_stress_test_py
python memory_leak_test.py- Unit tests: Use Catch2 framework in
tests/directory - Integration tests: Use Python pytest in
tests/integration_tests_py/ - Performance tests: Add benchmarks in
tests/benchmarks/
- Follow Google C++ Style Guide with exceptions:
- Use snake_case for functions and variables
- Use PascalCase for classes and structs
- Use UPPER_CASE for constants and macros
- Maximum line length: 120 characters
// 1. Include guards
#pragma once
// 2. System includes
#include <vector>
#include <string>
// 3. Third-party includes
#include <uwebsockets/App.h>
// 4. Project includes
#include "binaryrpc/core/interfaces/itransport.hpp"
// 5. Namespace
namespace binaryrpc {
// Your code here
}- Use Doxygen comments for public APIs
- Include examples in documentation
- Document exceptions and error conditions
- Interface First: Define interfaces in
include/binaryrpc/core/interfaces/ - Implementation: Add implementation in
src/core/ - Tests: Write comprehensive tests
- Documentation: Update README and add examples
// Example plugin structure
class MyPlugin : public IPlugin {
public:
void initialize() override;
const char* name() const override { return "MyPlugin"; }
private:
// Plugin-specific members
};// Example transport structure
class MyTransport : public ITransport {
public:
void start(uint16_t port) override;
void stop() override;
void send(const std::vector<uint8_t>& data) override;
// ... other interface methods
};- Search existing issues
- Reproduce the bug consistently
- Test with latest master branch
- Include minimal reproduction code
**Description**
Brief description of the issue
**Steps to Reproduce**
1. Step 1
2. Step 2
3. Step 3
**Expected Behavior**
What should happen
**Actual Behavior**
What actually happens
**Environment**
- OS: [e.g., Windows 10, Ubuntu 20.04]
- Compiler: [e.g., GCC 11.2, MSVC 2019]
- BinaryRPC Version: [e.g., commit hash]
**Additional Context**
Any other relevant information- Rebase on latest master
- Run all tests locally
- Update documentation if needed
- Add tests for new features
- Check code style compliance
**Description**
Brief description of changes
**Type of Change**
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
**Testing**
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
**Breaking Changes**
List any breaking changes and migration steps
**Additional Notes**
Any additional information- Use Doxygen for C++ API documentation
- Include usage examples in comments
- Document thread safety guarantees
- Specify exception safety levels
- README.md: Quick start and overview
- docs/: Detailed documentation
- examples/: Working code examples
- CHANGELOG.md: Version history
BinaryRPC follows Semantic Versioning (SemVer):
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
- Issues: Use GitHub issues for bugs and feature requests
- Discussions: Use GitHub Discussions for questions and ideas
- Code Review: All PRs require review from maintainers
- Be respectful and inclusive
- Focus on technical merit
- Help new contributors
- Follow project guidelines
By contributing to BinaryRPC, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to BinaryRPC! 🚀