Thank you for your interest in contributing to the Open Payments Rust client library! This document provides guidelines and information for contributors.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Use the GitHub issue tracker
- Use the bug report template
- Include detailed steps to reproduce the bug
- Provide your environment details (OS, Rust version, etc.)
- Include any error messages or logs
- Use the GitHub issue tracker
- Use the feature request template
- Describe the enhancement clearly
- Explain why this enhancement would be useful
- Consider the impact on existing functionality
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
cargo test) - Run clippy (
cargo clippy --all-targets --all-features -- -D warnings) - Format your code (
cargo fmt --all) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request using the PR template
- Rust 1.43.1 or later
- Git
git clone https://github.com/interledger/open-payments-rust.git
cd open-payments-rust
cargo build# Run all tests
cargo test
# Run tests with snippets feature
cargo test --features snippets
# Run doc tests
cargo test --doc
# Run clippy
cargo clippy --all-targets --all-features -- -D warnings
# Check formatting
cargo fmt --all -- --check# Generate documentation
cargo doc --no-deps
# Generate documentation with snippets
cargo doc --features snippets --no-deps
# Open documentation in browser
cargo doc --no-deps --open- Follow Rust conventions and idioms
- Use
cargo fmtto format code - Use
cargo clippyto check for common issues - Write comprehensive tests
- Add documentation for public APIs
- Use meaningful variable and function names
- Keep functions small and focused
- Add doc comments for all public items
- Write unit tests for all new functionality
- Ensure integration tests cover the main use cases
- Test both success and error scenarios
- Use descriptive test names
- Mock external dependencies when appropriate
- Add doc comments for all public APIs
- Include usage examples in doc comments
- Update README.md when adding new features
- Keep documentation up to date with code changes
- Use clear, descriptive commit messages
- Start with a verb in present tense
- Keep the first line under 50 characters
- Add more details in the body if needed
- Reference issues when applicable
- Update version in
Cargo.toml - Create a git tag
- Push the tag to trigger release workflow
If you have questions about contributing, please:
- Open an issue using the question template
- Reach out to the maintainers at tech@interledger.org
- Join our community discussions