Thank you for contributing! This guide covers code standards, the CI/CD pipeline all changes must pass, and the submission workflow.
- Read CONTEXT.md — Contains critical coding standards, error handling patterns, buffer management conventions, and RAII handle rules. This is non-negotiable.
- Check existing patterns — Review src/registry/mod.rs and src/process/processes.rs as complete reference implementations before building new features.
- Understand module structure — Each module follows a consistent pattern: public API in
mod.rs, internal utilities in submodules, tests alongside implementations.
Before you push, run these locally to expedite CI:
cargo fmt --all -- --check # Code formatting
cargo check --all-targets # Compile check (default features)
cargo check --all-targets --features full # Compile check (all features)
cargo clippy --all-targets -- -D warnings # Lint (default features)
cargo clippy --all-targets --features full -- -D warnings # Lint (all features)
cargo test --lib # Unit tests (default features)
cargo test --lib --features full # Unit tests (all features)
cargo test --tests # Integration testsThis stage validates code quality and must pass before any other checks run.
- cargo fmt --check: Code must follow rustfmt.toml formatting rules.
- cargo check (default features): All targets compile with default feature set.
- cargo check --all-targets --features full: All targets compile with all features.
- cargo clippy (default + all features, -D warnings): No clippy warnings allowed (warnings = errors).
If this stage fails, the entire pipeline stops.
Validates compilation for aarch64-pc-windows-msvc without runtime execution (compile-only).
- cargo check --target aarch64-pc-windows-msvc (default + all features)
- cargo build --examples --target aarch64-pc-windows-msvc (default + all features)
Note: Runtime validation requires native ARM64 hardware. CI validates compile-only correctness.
- cargo test --lib (default + all features): All unit tests.
- cargo test --tests: Integration tests, excluding:
etw_integration.rs(admin-required, #[ignore])raw_file_integration.rs(admin-required, #[ignore])- Timing-dependent
wait_any_*assertions (non-deterministic CI scheduling)
Includes: pipes_integration.rs, service_integration.rs, security_permissions_integration.rs.
If this stage fails, examples stages do not run.
Validates all 35 examples compile without errors (no execution).
- cargo build --examples (default + all features)
18 non-admin, side-effect-free, self-terminating examples with 1-minute timeout each. Built once in release mode.
- system_snapshot
- process_basics, process_metrics, process_mitigation, process_monitoring
- desktop_windows, wait_multi_object, security_permissions
- registry_basics, registry_convenience, registry_enumerate, registry_operations, registry_safe_access, registry_write
- proxy_system, proxy_for_url
- service_enumerate
- pipes_list
All must exit cleanly (no panics, no timeouts).
Event log examples with machine-state variability. Failures surface as CI warnings but do not block merge (continue-on-error: true).
- evt_custom_parsing
- evt_filter
- evt_streaming
- evt_serde --features serde
Empty logs are acceptable; 0 events is a valid result on restricted runners.
Validates Minimum Supported Rust Version (currently Rust 1.90) from Cargo.toml.
- cargo check --all-targets on Rust 1.90
ANY of these failures prevents merge to main:
- ❌ Code formatting
- ❌ Compilation
- ❌ Clippy lints
- ❌ ARM64 compilation
- ❌ Unit tests
- ❌ Integration tests
- ❌ Example compilation
- ❌ Phase 1 examples (safe auto-run)
- ❌ MSRV check
Phase 2 examples allow best-effort failures and do not block merge.
Keep changes minimal and focused. One feature or fix per PR.
Match existing module patterns:
- Use
Cow<'static, str>for error messages — never plainString - Implement RAII with
Dropfor all Windows handles - Provide
_with_bufferand_with_filtervariants for collection APIs - Use structured error types from src/error.rs, not ad-hoc errors
cargo check
cargo test --lib
# Run Phase 1 sanity pass
cargo run --example process_basics
cargo run --example registry_write- Follows patterns in CONTEXT.md?
- All Windows handles are RAII-protected?
- Error messages use
Cow<'static, str>, notString? - Collection APIs provide
_with_bufferand_with_filtervariants? - Phase 1 examples still pass?
- All local pre-push checks pass?
After code is merged to main, the crate maintainer must manually:
- Update version in Cargo.toml (semver discipline).
- Update CHANGELOG.md with the release date, version, and notable changes.
- Run
cargo publish --dry-runlocally to validate publishing metadata. - Run
cargo publishto push to crates.io. - Create a git tag for the release version.
No automatic publication occurs. All CI stages must pass before merge; publication is a manual gate.
Open an issue before submitting code.