Skip to content

Latest commit

 

History

History
128 lines (85 loc) · 3.4 KB

File metadata and controls

128 lines (85 loc) · 3.4 KB

Contributing to Recallable

Thank you for your interest in contributing to Recallable! We welcome contributions from the community.

Getting Started

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/recallable.git
  3. Create a new branch: git checkout -b feature/your-feature-name

Development Setup

Prerequisites

  • Rust 1.88 or newer (latest stable recommended for day-to-day development)
  • Cargo

Building the Project

cargo build

Running Tests

cargo test --package recallable
cargo test --package recallable --no-default-features
cargo test --package recallable --features impl_from
cargo test --package recallable --all-features

Property-based tests for the serde-backed integration suites run as part of the normal cargo test commands above.

Running Examples

The runnable example binaries live under recallable/examples/:

cargo run -p recallable --example basic_model
cargo run -p recallable --example nested_generic
cargo run -p recallable --example postcard_roundtrip
cargo run -p recallable --no-default-features --example manual_no_serde
cargo run -p recallable --no-default-features --features impl_from --example impl_from_roundtrip

Making Changes

Code Style

  • Follow the Rust API Guidelines
  • Run cargo clippy --workspace --all-targets --all-features --fix and address any warnings

Documentation

  • Add doc comments for all public APIs
  • Include examples in doc comments where applicable
  • Update README.md if adding new features

Testing

  • Write tests for new functionality
  • Ensure all existing tests pass
  • Add integration tests for significant features

Fuzzing

The repository includes manual fuzz targets under fuzz/.

Prerequisites:

  • rustup toolchain install nightly
  • cargo install cargo-fuzz

Smoke-run the fuzz targets from the fuzz/ directory:

cargo +nightly fuzz run json_memento corpus/json_memento -- -max_total_time=10
cargo +nightly fuzz run postcard_memento corpus/postcard_memento -- -max_total_time=10

Submitting Changes

  1. Commit your changes with clear, descriptive commit messages
  2. Push to your fork: git push origin feature/your-feature-name
  3. Open a Pull Request against the main repository
  4. Describe your changes in the PR description
  5. Link any related issues

Pull Request Guidelines

  • Keep PRs focused on a single feature or bug fix
  • Include tests for new functionality
  • Update documentation as needed
  • Ensure CI passes on both stable and the MSRV job before requesting review

Reporting Bugs

When reporting bugs, please include:

  • A clear description of the issue
  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Rust version and OS
  • Minimal code example demonstrating the issue

Feature Requests

We welcome feature requests! Please:

  • Check if the feature has already been requested
  • Clearly describe the use case
  • Explain why it would be valuable to the project
  • Consider submitting a PR if you're able to implement it

Code of Conduct

Please be respectful and constructive in all interactions. We aim to foster an inclusive and welcoming community.

Questions?

Feel free to open an issue for questions or discussions about the project.

License

By contributing to recallable, you agree that your contributions will be licensed under the MIT License and Apache-2.0 License.