Skip to content

Latest commit

 

History

History
123 lines (90 loc) · 3.22 KB

File metadata and controls

123 lines (90 loc) · 3.22 KB

Contributing to FastAlloc

Thank you for considering contributing to FastAlloc! We appreciate your time and effort in making this project better.

Table of Contents

Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork locally
    git clone https://github.com/your-username/fastalloc.git
    cd fastalloc
  3. Install Rust using rustup
  4. Install development tools:
    rustup component add rustfmt clippy

Development Workflow

  1. Create a new branch for your changes:
    git checkout -b feature/your-feature-name
  2. Make your changes following the coding standards
  3. Run tests and verify everything works
  4. Commit your changes with a descriptive message
  5. Push to your fork and open a pull request

Coding Standards

  • Follow the Rust API Guidelines
  • Use rustfmt for consistent code formatting
  • Run cargo clippy to catch common mistakes and improve code quality
  • Document all public APIs with rustdoc comments
  • Write unit tests for new functionality
  • Keep commits focused and atomic

Testing

Run the test suite:

# Run all tests
cargo test --all-features

# Run tests for no_std
cargo test --no-default-features

# Run benchmarks
cargo bench

# Run MIRI to detect undefined behavior
cargo +nightly miri test

# Run fuzzing (if available)
cargo +nightly fuzz run <target>

Pull Request Process

  1. Ensure all tests pass
  2. Update documentation as needed
  3. Add tests for new features or bug fixes
  4. Ensure your code is properly formatted
  5. Open a pull request with a clear description of changes
  6. Reference any related issues
  7. Wait for code review and address any feedback

Reporting Bugs

Please open an issue on GitHub with the following information:

  • Description of the bug
  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Environment details (Rust version, OS, etc.)
  • Any relevant logs or error messages

Feature Requests

We welcome feature requests! Please open an issue describing:

  • The feature you'd like to see
  • Why this feature is valuable
  • Any potential implementation ideas

Documentation

Good documentation is crucial. When contributing:

  • Document all public APIs
  • Include code examples
  • Update the README for user-facing changes
  • Add or update examples in the examples/ directory

Community

License

By contributing to FastAlloc, you agree that your contributions will be licensed under its MIT/Apache-2.0 dual license.