Thank you for your interest in contributing to MIND! This document provides guidelines and information for contributors.
By participating in this project, you agree to abide by our Code of Conduct.
- Rust: stable toolchain (1.82+), nightly for some optional features
- Tools:
cargo,rustfmt,clippy - Optional: LLVM/MLIR for backend features
| Platform | Status | Notes |
|---|---|---|
| Linux (x86_64) | Fully supported | Primary development platform |
| macOS (x86_64/ARM64) | Fully supported | CI tested |
| Windows (x86_64) | Fully supported | CI tested |
git clone https://github.com/star-ga/mind.git
cd mind
cargo build --no-default-features
cargo test --no-default-features- No default features must compile:
cargo check --no-default-features - Format with rustfmt:
cargo fmt --all - Lint with clippy:
cargo clippy --no-default-features -- -D warnings
All PRs must pass these checks:
| Check | Command |
|---|---|
| Format | cargo fmt --all -- --check |
| Build | cargo build --no-default-features |
| Test | cargo test --no-default-features |
| Clippy | cargo clippy --no-default-features -- -D warnings |
| License | cargo deny check |
| Docs | cargo doc --no-default-features --document-private-items |
# All tests (no features)
cargo test --no-default-features
# With specific features
cargo test --features autodiff
cargo test --features cpu-exec
# Single test
cargo test test_nameBefore starting work:
- Check existing issues: Search for related issues/PRs
- Open a discussion: For large changes, discuss first
- Claim the issue: Comment to indicate you're working on it
Issue labels:
good first issue: Suitable for newcomershelp wanted: Open for contributionsbug: Something isn't workingenhancement: New feature or improvementdocumentation: Documentation improvements
- Fork and branch: Create a feature branch from
main - Make changes: Keep commits small and focused
- Test locally: Ensure all CI checks pass
- Update docs: Document user-visible changes
- Submit PR: Use the PR template
- Small, focused commits: One logical change per commit
- Tests required: Add tests for new behavior (prefer
tests/integration tests) - Documentation: Update README/docs for user-visible changes
- No breaking changes: Without prior discussion
We use conventional commit format:
type: short description
Longer explanation if needed.
Fixes #123
Types:
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code refactoring |
test |
Adding/updating tests |
ci |
CI/CD changes |
chore |
Maintenance tasks |
perf |
Performance improvements |
Examples:
feat: add symbolic shape unification
fix: handle edge case in broadcast inference
docs: update autodiff examples
refactor: simplify IR canonicalization pass
By contributing, you certify that:
- The contribution was created by you, or
- You have the right to submit it under the project license, or
- It was provided to you by someone with rights to submit
You can sign off commits with:
git commit -s -m "feat: your feature"This adds a Signed-off-by line to your commit message.
- Correctness and test coverage
- Code clarity and maintainability
- Documentation quality
- Performance considerations
- Security implications
- Initial review: within 3 business days
- Follow-up reviews: within 2 business days
- Merge after approval from at least one maintainer
- Address all comments before requesting re-review
- Use "Resolve conversation" when addressed
- Ask for clarification if feedback is unclear
src/
├── ast/ # Abstract syntax tree
├── lexer/ # Tokenization
├── parser/ # Parsing
├── types/ # Type system
├── shapes/ # Shape inference
├── ir/ # Intermediate representation
├── opt/ # Optimizations
├── autodiff/ # Automatic differentiation
├── mlir/ # MLIR lowering
├── eval/ # Evaluation/runtime
├── exec/ # Execution backends
└── ffi/ # Foreign function interface
- Follow existing patterns in the codebase
- Use descriptive names for functions and variables
- Add doc comments for public APIs
- Keep functions focused and small
- Avoid unnecessary complexity
- Questions: Open a GitHub Discussion
- Bugs: File an issue with reproduction steps
- Security: See SECURITY.md
- Chat: Join discussions in issues/PRs
Contributors are recognized in:
- Release notes
- GitHub contributor graphs
Thank you for contributing to MIND!