4.3 KiB
Contributing to Nyx
First off, thank you for taking the time to contribute! By participating in this project, you agree to abide by the community values and expectations described in our Code of Conduct.
Nyx is dual‑licensed under MIT and Apache‑2.0. By submitting code, documentation, or any other material, you agree to license your contribution under these same terms.
Table of Contents
Getting Started
Clone the repository and build Nyx in release mode:
git clone https://github.com/<your‑org>/nyx.git
cd nyx
cargo build --release
Run the test‑suite:
cargo test
Tip: The first build downloads and compiles several
tree‑sittergrammars. Later builds will be faster.
How to Contribute
Bug Reports
- Search existing issues to ensure the bug has not already been reported.
- Include steps to reproduce, expected vs. actual behaviour, and your environment details (
nyx --version,rustc --version). - Attach a minimal code sample if possible.
Feature Requests
We welcome well‑motivated feature proposals. Please describe:
- Problem statement – what pain point does this solve?
- Proposed solution – high‑level description, optionally with pseudo‑code.
- Alternatives considered – why existing functionality is not enough.
Pull Requests
Every PR should:
- Target the
mainbranch. - Contain a single, focused change (small orthogonal fixes are okay).
- Pass
cargo test,cargo fmt --check, andcargo clippy -- -D warnings. - Update documentation and, when relevant, add tests.
- Reference related issue numbers in the description (
Fixes #123).
A reviewer will provide feedback within 3 business days. Squash‑merge is the default strategy; maintainers may edit commit messages for clarity.
Development Workflow
-
Fork the repo and create your feature branch:
git checkout -b feature/my‑feature -
Make your changes, then run:
cargo fmt cargo clippy --all-targets --all-features -- -D warnings cargo test -
Sign‑off your commits if your employer requires a Developer Certificate of Origin (DCO):
git commit -s -m "feat: add XYZ" -
Push the branch and open a PR against
main.
Commit & Branching Conventions
-
Branch names:
feature/<slug>,fix/<slug>,docs/<slug> -
Commit style – Conventional Commits (simplified):
type(scope): subject body (optional)Type Use for featNew functionality fixBug fixes docsDocumentation only refactorCode change without behaviour change testAdding or changing tests choreBuild process, tooling
Style Guide
- Formatting: run
cargo fmtbefore committing. - Linting: CI runs Clippy with
-D warnings; keep the tree warning‑free. - Unsafe Rust: prohibited unless absolutely necessary. Justify with in‑code comments.
- Public API stability: avoid breaking changes on exported types and functions without prior discussion.
Security Policy
Please do not open public issues for security‑sensitive bugs. Instead, email the maintainers at <security@example.com> with the details and a proof of concept. We aim to acknowledge reports within 48 hours.
Community Standards
We strive to maintain a welcoming and inclusive community. Harassment, discrimination, or other forms of unacceptable behavior will be addressed per the Code of Conduct.
Thank you for helping to make Nyx better!