Short, practical rules. The project is MIT-licensed; by contributing you agree your work lands under the same license.
cargo fmt --all -- --check
cargo check --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo nextest run --workspaceCI runs exactly this on Ubuntu, Windows and macOS. If CI is red,
the PR waits — no exceptions. Run cargo fmt --all (not manual
reformatting) whenever --check complains.
Rust 1.91+ (pinned via rust-toolchain.toml). FFmpeg 5.1+ binary on
PATH for media features. Linux needs the GTK/ALSA dev packages
(see README); Windows needs VS Build Tools (C++ workload).
- Conventional style:
feat(ui): …,fix(render): …,refactor(ui): …,style(ui): …(fmt-only),docs: …,chore(release): …. - One logical change per commit, so each stays revertable.
- Commit message body explains why, not what (the diff shows
what). Reference issues as
Closes #NNwhen applicable. - Never commit:
DIRECTIVES.md(local notes, gitignored),installer/dist/,*.log, local scratch files.
- Every user-visible string goes through
tr("key")— no hardcoded English/Croatian in UI code. Add theen+hrkeys together; see TRANSLATING.md. - UI panels never call
ui.button(...)directly; usecrate::widgets::button::{primary, secondary, ghost, icon}. In menusui.buttonis the correct idiom. - Boolean toggles use
switch::switch_labeled; keepcheckboxonly for disclosures (expand/collapse), not state flags. - New visual effects/filters: one
Presetrow inasset_browser.rs- one match arm in
build_one_effect(export_graph.rs) +en/hrlabels + a chain test. Same for transitions viaxfade_name(overlap/shift logic keys offis_xfade_id, so new xfade-family ids get it for free).
- one match arm in
- Undoable mutations go through
UndoStackcommands (caprust-core/src/commands/). Read-only header interactions (lock/mute/volume) write directly like the existing chips. cargo fmtowns formatting. Do not hand-format; do not fight it.
cargo nextest run --workspacemust stay green. New render logic needs a filtergraph assertion test (seeexport_graph.rstests); new widgets need a renders-without-panic test.- Some integration tests are
#[ignore]d (need real model files); run them explicitly when touching that area (see README Testing).
- Bugs: use the bug report template (version, Windows version,
FFmpeg source, logs with
RUST_LOG=caprust=debug). - Ideas and questions: GitHub Discussions.
- Check
DIRECTIVES.md§18 roadmap context if you have it locally; externally, the CHANGELOG shows where the project stands.