Thanks for your interest in improving ELNPack! This guide keeps contributions consistent and easy to review.
- Use stable Rust (MSRV is 1.92.0)
- Run locally before opening a PR:
cargo fmtcargo clippy --all-targets --all-featurescargo doc --no-deps(CI enforces doc warnings)cargo test
- Keep changes focused; avoid mixing refactors with behavior changes.
- Follow rustfmt defaults.
- Add SPDX headers to new source files (Rust); configs/docs are covered via
REUSE.toml:// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: 2025 Your Name - Prefer MVU layering already used in the project: model/update/view separation, UI-free domain logic.
- Use Conventional Commits (e.g.,
feat: ...,fix: ...,docs: ...). - Valid types:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert. - Examples:
feat: add new feature;fix(ui): correct button alignment;docs: update README. - Include a short PR description:
- What changed
- How to test
- Screenshots for UI tweaks
- Add tests when fixing bugs or adding logic.
- Tagged releases: pushing a semver-ish tag (
v*) triggers.github/workflows/release.ymlto lint/test and build/upload artifacts for Linux (x86_64/i686), macOS (arm64/x86_64), and Windows (x86_64/i686). Release notes are generated via git-cliff. - Release helper:
scripts/create_release.sh <version>bumps workspace version, optionally commits, and tags. Push the commit (if created) first, then push the tag (v*) to origin to start the pipeline. - CI matrix:
ci.ymlruns fmt → clippy → test →cargo doc --no-deps; keep PRs green by matching these locally. - Helper prerequisite:
cargo-editmust be installed locally (cargo install cargo-edit) forcargo set-version.
Repository hooks live in .githooks. Run ./scripts/install-git-hooks.sh once to point core.hooksPath there.
commit-msg— validates commit messages follow Conventional Commits.pre-commit— runscargo fmt(writes changes),cargo clippy, andcargo test; setSKIP_PRE_COMMIT=1to bypass locally.pre-push— re-validates commit messages for pushed commits (catches rebases that skippedcommit-msg).
commit-msg and pre-push share validate-commit-msg.sh for consistent checks.
- For bugs, include steps to reproduce, expected/actual behavior, OS, and screenshots if UI-related.
- For feature requests, describe the use case and desired outcome.
- The app is local-only; no network calls are performed at runtime. Please avoid adding network I/O without discussion.
Thanks for helping make ELNPack better!