Thank you for your interest in contributing to RustAPI! This document provides guidelines and information for contributors.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
- Fork the repository
- Clone your fork:
git clone https://github.com/Tuntii/RustAPI.git - Create a new branch:
git checkout -b feature/your-feature-name - Make your changes
- Run tests:
cargo test --workspace - Submit a pull request
- Rust 1.75 or later
- Cargo (comes with Rust)
# Build all crates
cargo build --workspace
# Build with all features
cargo build --workspace --all-features# Run all tests
cargo test --workspace
# Run tests with all features
cargo test --workspace --all-features
# Run a specific crate's tests
cargo test -p rustapi-coreAll code must be formatted with rustfmt:
cargo fmt --allAll code must pass clippy checks:
cargo clippy --workspace --all-features -- -D warnings- All public APIs must have rustdoc documentation
- Include code examples in doc comments where appropriate
- Doc examples must compile and run
-
Create a descriptive PR title following conventional commits:
feat:for new featuresfix:for bug fixesdocs:for documentation changesrefactor:for code refactoringtest:for test additions/changeschore:for maintenance tasks
-
Fill out the PR template with:
- Description of changes
- Related issue numbers
- Testing performed
-
Ensure all checks pass:
- All tests pass
- Code is formatted (
cargo fmt) - No clippy warnings (
cargo clippy) - Documentation builds
-
Request review from maintainers
-
Address feedback promptly and push updates
- Write clear, concise commit messages
- Use present tense ("Add feature" not "Added feature")
- Reference issues when applicable (
Fixes #123)
RustAPI/
├── crates/
│ ├── rustapi-rs/ # Public-facing crate (re-exports)
│ ├── rustapi-core/ # Core HTTP engine and routing
│ ├── rustapi-macros/ # Procedural macros
│ ├── rustapi-validate/ # Validation integration
│ ├── rustapi-openapi/ # OpenAPI/Swagger support
│ └── rustapi-extras/ # Optional features (JWT, CORS, etc.)
├── examples/ # Example applications
├── benches/ # Benchmarks
└── scripts/ # Build and publish scripts
- Discuss the feature in an issue first
- Follow the existing architecture patterns
- Add tests for new functionality
- Update documentation
- Add examples if applicable
When reporting issues, please include:
- Rust version (
rustc --version) - RustAPI version
- Minimal reproduction code
- Expected vs actual behavior
- Error messages (if any)
Feel free to open an issue for questions or join discussions in existing issues.
Thank you for contributing to RustAPI!