Contributing to Q++¶
Thank you for your interest in contributing to Q++!
Building¶
Prerequisites¶
- Rust — Install from rustup.rs
- LLVM 18 — For building the compiler (inkwell). Windows: download tarball from llvm.org or
choco install llvm; Linux:apt install llvm-18-dev; macOS:brew install llvm@18
Build¶
Release build:
The compiler binary will be at target/release/qpp (or qpp.exe on Windows).
Testing¶
Development Workflow¶
- Fork the repository
- Create a branch —
feature/your-featureorfix/your-fix - Make changes — Follow existing code style
- Run tests —
cargo test - Submit a PR — Describe your changes clearly
Commit Conventions¶
We use Conventional Commits:
feat:— New featurefix:— Bug fixdocs:— Documentation onlytest:— Adding or updating testsrefactor:— Code change that neither fixes a bug nor adds a featurechore:— Maintenance tasks
Example: feat(parser): add extern declarations
Code Style¶
- Follow Rust standard formatting:
cargo fmt - Run clippy:
cargo clippy
Project Structure¶
src/— Compiler source (lexer, parser, semantic, codegen)stdlib/— Standard library modules (fs, os, math, arena, simd, etc.)docs/— Documentationtests/— Integration tests