Thank you for your interest in contributing to RustRoute! This document provides guidelines and information for contributors.
- 🐛 Bug Reports: Report issues you encounter
- 💡 Feature Requests: Suggest new features or improvements
- 🔧 Code Contributions: Submit pull requests with fixes or enhancements
- 📖 Documentation: Improve docs, examples, and tutorials
- 🧪 Testing: Add test cases and improve test coverage
- Rust: Install from rustup.rs
- Git: Version control system
- Python 3.8+: For demo scripts (optional)
# Clone the repository
git clone https://github.com/LITLAY2004/Rust-Route.git
cd Rust-Route
# Build the project
cargo build
# Run tests
cargo test
# Run the demo
cargo run --example basic_routerWe follow Rust's official style guidelines:
# Format code
cargo fmt
# Lint code
cargo clippy --all-targets --all-features -- -D warnings
# Check all
cargo fmt && cargo clippy && cargo testUse conventional commit format:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Adding testschore: Maintenance tasks
Examples:
feat(router): add support for IPv6 routes
fix(protocol): handle malformed RIP packets gracefully
docs(readme): update installation instructions
feature/description- New featuresfix/description- Bug fixesdocs/description- Documentation updatesrefactor/description- Code refactoring
# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture
# Run doctests
cargo test --doc- Unit tests: Test individual functions and modules
- Integration tests: Test component interactions
- Property tests: Use
proptestfor property-based testing
Example:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_route_parsing() {
let route = Route::new("192.168.1.0", 24, "192.168.1.1", 1);
assert_eq!(route.network(), "192.168.1.0");
assert_eq!(route.prefix_length(), 24);
}
}- Use
///for public API documentation - Include examples in documentation
- Document all public functions, structs, and modules
/// Represents a network route in the routing table.
///
/// # Examples
///
/// ```
/// use rust_route::Route;
///
/// let route = Route::new("192.168.1.0", 24, "192.168.1.1", 1);
/// assert_eq!(route.network(), "192.168.1.0");
/// ```
pub struct Route {
// ...
}- Keep README.md up to date
- Update USER_MANUAL.md for new features
- Add examples for new functionality
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Document your changes
- Submit a pull request
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
## Testing
- [ ] Tests pass locally
- [ ] Added new tests
- [ ] Updated documentation
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No new warnings- ✅ Functionality: Does it work as intended?
- ✅ Code Quality: Is it well-structured and readable?
- ✅ Performance: Any performance implications?
- ✅ Testing: Adequate test coverage?
- ✅ Documentation: Proper documentation?
- ✅ Security: No security vulnerabilities?
Include the following information:
**Describe the bug**
A clear description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Run command '...'
2. Send packet '...'
3. See error
**Expected behavior**
What you expected to happen.
**Environment:**
- OS: [e.g. Ubuntu 20.04]
- Rust version: [e.g. 1.70.0]
- RustRoute version: [e.g. 0.2.0]
**Additional context**
Any other context about the problem.**Is your feature request related to a problem?**
A clear description of what the problem is.
**Describe the solution you'd like**
A clear description of what you want to happen.
**Describe alternatives you've considered**
Alternative solutions or features you've considered.
**Additional context**
Any other context about the feature request.rust-route/
├── src/
│ ├── main.rs # Main entry point
│ ├── router.rs # Core router implementation
│ ├── routing_table.rs # Routing table management
│ ├── protocol.rs # RIP protocol implementation
│ └── lib.rs # Library interface
├── examples/ # Usage examples
├── tests/ # Integration tests
├── benches/ # Performance benchmarks
└── docs/ # Additional documentation
- Router: Main router logic and packet processing
- RoutingTable: Route storage and lookup
- Protocol: RIP packet parsing and generation
- Config: Configuration management
We follow Semantic Versioning:
MAJOR.MINOR.PATCHMAJOR: Breaking changesMINOR: New features (backward compatible)PATCH: Bug fixes (backward compatible)
- Update version in
Cargo.toml - Update
CHANGELOG.md - Run full test suite
- Update documentation
- Create release PR
- Tag release after merge
Contributors will be:
- 🏷️ Listed in the project README
- 📝 Mentioned in release notes
- 🎖️ Added to the contributors list
- 💬 Discussions: Use GitHub Discussions for questions
- 🐛 Issues: Report bugs via GitHub Issues
- 📧 Email: Contact maintainers directly for sensitive issues
This project follows the Rust Code of Conduct. Please be respectful and inclusive.
By contributing to RustRoute, you agree that your contributions will be licensed under the MIT License.
Happy Contributing! 🦀✨
Thank you for helping make RustRoute better for everyone!