pixl is a native rust image processing engine and cli. keep it small, correct and predictable. prefer straightforward rust over clever rust.
crates/pixl-core— typed image representation, pixel formats, limitscrates/pixl-codecs— format detection and codec integrationcrates/pixl-ops— image operations, scratch buffers, parallelismcrates/pixl-cli— argument parsing, ordered operations, diagnostics
pixl-color and pixl-cache are not separate crates: colour conversion is
small and lives in core/ops, and scratch buffers are local to operations.
create them only when a concrete need appears.
- rgba8 is the internal working format.
- images are contiguous vecs with checked dimensions.
- limits are enforced before allocation.
- resizing uses
fast_image_resizewith runtime cpu detection. - gaussian blur is separable convolution.
- parallelism uses the rayon global pool; no nested pools.
cargo fmt --all -- --check
cargo check --workspace --all-targets --locked
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked
cargo doc --workspace --no-deps
cargo bench -p pixl-ops- lowercase prose and comments.
- snake_case modules and functions, PascalCase types.
- no comments that restate code.
- document public apis briefly.
- no unnecessary abstractions, macros or dependency layers.
- unit tests live beside implementations.
- reference tests use hand-computed expected values.
- cli integration tests exercise the built binary.
- every bug fix needs a regression test.
- exact pins in the workspace for reproducibility.
- workspace inheritance for shared versions.
- 3-day publish-age cooldown via
.cargo/config.toml. - no dependency without a concrete reason.
- measure before optimising.
- never invent benchmark numbers.
- no
target-cpu=nativein portable builds. - no unsafe code without a documented reason.
- all image input is untrusted.
- enforce dimension and pixel limits.
- handle decoder errors explicitly.
- no unsafe blocks without a safety comment.
- small, focused commits.
- never commit generated artifacts or secrets.
- do not claim checks passed unless they actually did.