Thank you for your interest in contributing to antifragile! This document provides guidelines and instructions for contributing.
- Contributing to antifragile
Note: This project uses Rust edition 2024.
- Clone the repository:
git clone https://github.com/minikin/antifragile.git
cd antifragile- Install development dependencies:
rustup component add rustfmt clippy
cargo test --all-features# Run only integration tests
cargo test --tests --all-features
# Run only unit tests
cargo test --lib
# Run a specific test file
cargo test --test basic_testscargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo doc --all-features --no-deps --open- Follow Rust's official style guidelines
- Run
cargo fmtbefore committing - Ensure
cargo clippyproduces no warnings - Write clear, descriptive commit messages
- Add tests for all new functionality
- Ensure all existing tests pass
- Integration tests go in the
tests/directory - Unit tests go in the same file as the code they test
- Document all public APIs with doc comments
- Include examples in doc comments where appropriate
- Update README.md if adding major features
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for your changes
- Run the full test suite:
cargo test --all-features - Run formatting and linting:
cargo fmt --all cargo clippy --all-targets --all-features -- -D warnings
- Commit your changes with a descriptive message
- Push to your fork
- Open a Pull Request against the
mainbranch
- All CI checks must pass
- Code must be formatted with
rustfmt - No
clippywarnings - All tests must pass on Linux, macOS, and Windows
- Code coverage should not decrease
- Documentation is updated if needed
The project uses feature flags for optional functionality:
serde: Serialization/deserialization support
When adding new features:
- Make them optional via feature flags when appropriate
- Test with and without the feature enabled
- Document the feature in README.md
Use conventional commits format:
type(scope): subject
body
footer
Types:
feat: New featurefix: Bug fixdocs: Documentation changestest: Adding or updating testsrefactor: Code refactoringperf: Performance improvementschore: Maintenance tasks
Examples:
feat(core): add new is_nullish method
fix(serde): correct deserialization of absent fields
docs(readme): update usage examples
test(conversion): add tests for from_nullable
Releases are managed by maintainers:
- Update version in
Cargo.toml - Update CHANGELOG.md
- Create a git tag:
git tag -a v0.x.y -m "Release v0.x.y" - Push tag:
git push origin v0.x.y - GitHub Actions will automatically publish to crates.io
- Found a bug or have a feature request? Please submit a Pull Request directly. The Issues tab is not available on this repository as we don't have the capacity to manage incoming issues at this time.
- For questions or ideas, feel free to open a PR with your proposed changes or improvements.
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help create a welcoming environment for all contributors
This project is licensed under the MIT License - see the LICENSE file for details.