Contributing
Getting Started
- Fork the repository
- Clone and build:
cargo build --workspace - Run tests:
cargo test --workspace - Make changes on a feature branch
Code Style
cargo fmtbefore committingcargo clippy -- -D warningsmust pass- No new warnings in any crate
Adding a New Quirk
Observed a new device behavior? Add it to the registry:
- Document the symptoms, trigger, and firmware version in a GitHub issue
- Add the quirk to
crates/facecam-common/src/quirks.rs - Add a test to the harness if the behavior is testable
- Update
docs/src/architecture/quirks.md
Adding a New Control
If a firmware update exposes new V4L2 controls:
- Verify with
v4l2-ctl --list-ctrlsand document the CID, range, default - Add to
v4l2::control_name_to_id()mapping - Update
docs/src/device/controls.md - Update default profiles if the control has useful presets
Pull Request Checklist
-
cargo fmt --all -- --checkpasses -
cargo clippy --workspace -- -D warningspasses -
cargo build --workspace --releasesucceeds - New quirks have traceable observations
- Docs updated for user-facing changes
- Commit messages describe why, not just what
Architecture Notes
- facecam-common is the shared library — put types, parsing, and protocol logic here
- Binary crates should be thin wrappers around common functionality
- V4L2 ioctls use raw byte arrays with verified struct offsets (see
v4l2.rscomments) - No C dependencies in the core library except libc and libusb