Guidelines for contributing to the MIND compiler, runtime, and toolchain.
Development Setup
Clone the repository and build
Clone the repository and ensure you have the required toolchain:
git clone https://github.com/star-ga/mind.git cd mind rustup update stable cargo build --allThe project requires stable Rust. Nightly features are not used.
Format before every commit
Run
cargo fmt --allwith the default stable rustfmt configuration (see Code Formatting).Audit dependencies
Run
cargo deny check(see Security Auditing with cargo-deny).Run the tests
Run the full test suite and the conformance profile (see Running Tests).
Code Formatting
All code must be formatted using the default stable rustfmt configuration. Run formatting before committing:
cargo fmt --allThe project uses only stable rustfmt options. Deprecated or nightly-only options like wrap_comments are not used. The default rustfmt.toml configuration (if present) contains only stable options compatible with the current Rust stable toolchain.
Warning
CI will fail if code is not properly formatted. Always run cargo fmt --all before pushing.
Security Auditing with cargo-deny
The project uses cargo-deny to audit dependencies for security vulnerabilities and license compliance:
cargo deny checkHandling CVSS v4 Advisories
Some security advisories use CVSS v4 scoring, which older versions of cargo-deny do not fully support. If you encounter errors like:
error: advisory uses unsupported CVSS v4 formatThere are two approaches to resolve this:
Update cargo-deny
Use the sanitize script
Check the repository's scripts/ directory or CI configuration for the current recommended approach.
Running Tests
Run the full test suite before submitting changes:
cargo test --allFor conformance testing against the specification:
cargo run --bin mindc -- conformance --profile cpuPull Request Guidelines
| Before you open a PR | How |
|---|---|
| Ensure all tests pass | cargo test --all |
| Ensure code is formatted | cargo fmt --all |
| Ensure no clippy warnings | cargo clippy --all -- -D warnings |
| Ensure dependencies pass audit | cargo deny check |
| Write clear commit messages | Describe the change |
| Reference any related issues | In the PR description |
Project Structure
The MIND ecosystem spans multiple repositories:
star-ga/mind
mindc).star-ga/mind-spec
mind-runtime
Getting Help
If you have questions about contributing, open a discussion on the GitHub Discussions page or check existing issues for guidance.