Welcome! We're glad you're interested in contributing to Meld.
- Rust (stable toolchain)
- Cargo
- Git
- Python (for pre-commit hooks)
- Nix (optional, for building Rocq proofs via Bazel)
# Clone the repository
git clone https://github.com/pulseengine/meld.git
cd meld
# Install pre-commit hooks
pip install pre-commit
pre-commit install
# Build the project
cargo build
# Run tests
cargo testWe use several tools to maintain code quality:
We use pre-commit to run checks before each commit:
- cargo fmt: Format code according to Rust style guidelines
- cargo clippy: Run static analysis with clippy lints
- cargo test: Run all tests
To run pre-commit hooks manually:
pre-commit run --all-filesOur clippy configuration treats all warnings as errors (-D warnings). See clippy.toml for details.
Common clippy lints we enforce:
dead_code: Find unused codeunnecessary_lazy_evaluations: Avoid unnecessary closuresunnecessary_cast: Avoid redundant type castsuseless_conversion: Avoid redundant conversionslen_zero: Preferis_empty()overlen() > 0clone_on_copy: Avoid cloning Copy typesderivable_impls: Use#[derive]when possible
We use rustfmt for consistent code formatting:
# Format all code
cargo fmt
# Check formatting
cargo fmt --all -- --checkRun the full test suite:
cargo test --allIf you have Nix installed, you can verify the Rocq proofs:
bazel build //proofs/transformations/merge:merge_spec
bazel build //proofs/spec:fusion_spec- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and commit them with pre-commit hooks
- Push to your fork and submit a pull request
- Ensure all CI checks pass
- Follow Rust API guidelines
- Use descriptive variable and function names
- Add documentation comments for public APIs
- Keep functions focused and small
- Write tests for new functionality
Update documentation when making changes:
- Update
README.mdfor user-facing changes - Update
CONTRIBUTING.mdfor development process changes - Add doc comments for new public APIs
By contributing to Meld, you agree that your contributions will be licensed under the Apache License 2.0.