Skip to content

refactor(image): isolate format package boundaries - #61

Merged
justin13888 merged 11 commits into
masterfrom
refactor/14-format-crates
Aug 5, 2026
Merged

refactor(image): isolate format package boundaries#61
justin13888 merged 11 commits into
masterfrom
refactor/14-format-crates

Conversation

@justin13888

@justin13888 justin13888 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • split all 17 image formats into independently publishable rawshift-image-* leaf crates
  • add rawshift-image-core capability/error/image contracts plus focused metadata, IFD, and lossless-JPEG support crates
  • preserve the existing rawshift-image and rawshift APIs and feature facade while keeping processing, transforms, camera data, and APV central
  • expose direct default decoders for every implemented leaf and default encoders for JPEG, PNG, WebP, AVIF, JXL, and DNG
  • integrate the gamut-webp migration from master into the extracted, safe-Rust rawshift-image-webp leaf

Design

Format leaves depend on shared contracts instead of the aggregate crate, so the dependency graph remains acyclic. The aggregate crate uses default-features = false leaf dependencies and forwards its existing direction features. Direct leaf dependencies default to decode support. Gamut remains the upstream implementation wherever available; no gamut workaround was added.

Validation

  • cargo fmt --all -- --check
  • just clippy
  • just test
  • just test-all
  • cargo test -p rawshift-image-webp --no-default-features --features decode,encode,serde
  • WebP decode-only, encode-only, combined, and serde feature checks
  • focused facade WebP export and libwebp-fixture interoperability tests
  • image-only and video-only builds plus dependency-isolation assertions
  • full-feature rawshift-image and rawshift checks
  • strict workspace rustdoc build with warnings denied
  • CI compile-boundary matrix for valid and invalid feature/target combinations

Risks and rollout

This is a breaking v1 package/API refactor; 0.x source compatibility is explicitly a non-goal for the release. The merge preserves the WebP API and behavior now present on master while relocating its implementation behind the new leaf boundary.

Issue

Closes #14

@justin13888
justin13888 merged commit 2dd260a into master Aug 5, 2026
16 checks passed
@justin13888
justin13888 deleted the refactor/14-format-crates branch August 5, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Isolate clear package boundaries

1 participant