Pprepare v0.8.0 cargo packages for publishing#24
Merged
Conversation
added 10 commits
April 16, 2026 09:02
Fixed all clippy warnings Fixed cargo docs warnings cargo fmt on entire workspace rename r3sizer-cli to r3sizer
…::{Process,
Sweep, Diff, Corpus, Presets} subcommands. Shared pipeline flags extracted into
PipelineArgs and #[command(flatten)]'d into ProcessArgs and SweepArgs. Added
OutputFormat enum and --output-format json flag on process.
- main.rs — dispatch on Commands enum, clean match.
- run.rs — resolve_dimensions and build_params now take &PipelineArgs; run takes
&ProcessArgs. JSON output path via print_summary_json.
- sweep.rs — updated to SweepArgs; --sweep-dir/--sweep-output-dir/--sweep-summary
replaced by --in-dir/--out-dir/--summary.
- presets.rs — added list_presets() and show_preset(name) commands.
- output.rs — added print_summary_json (serialises AutoSharpDiagnostics as JSON to
stdout).
- tests/cli.rs — 10 integration tests covering process, presets, and diff subcommands;
uses assert_cmd + predicates + tempfile.
- docs/cli.md — rewritten to show subcommand structure.
- CLAUDE.md — commands block updated to new syntax.
New interface:
r3sizer process -i photo.jpg -o out.png --width 800 --height 600
r3sizer sweep --in-dir ./photos --out-dir ./out --summary summary.json --width 800
r3sizer diff baseline.json candidate.json
r3sizer corpus ./corpus
r3sizer presets list
r3sizer presets show photo
- PreparedBase::compute_detail(params) — thin wrapper over compute_probe_detail free function
- PreparedBase::run_probes(strengths, params) — thin wrapper over run_probes_standalone
- crates/r3sizer-io/examples/single_file.rs — basic end-to-end example (~40 lines)
- crates/r3sizer-io/examples/two_phase.rs — prepare once, run with Fast/Balanced/Quality modes
- crates/r3sizer-io/examples/custom_params.rs — manual params: Uniform+RGB vs ContentAdaptive+Lightness
Phase 5 — Input safety limits
- DecodeLimits { max_pixels, max_dimension } with sane defaults (100 MP, 16384 px)
- load_as_linear_with_limits reads the image header before allocating the pixel buffer
- load_as_linear is now a wrapper around it — existing callers get protection for free
- IoError::TooLarge { width, height } variant
- --max-pixels / --max-dimension flags added to process and sweep subcommands
- 4 tests covering the limit enforcement
Phase 6 — Repo hygiene docs
- SECURITY.md — threat model, decode-limit mitigations, reporting address
- CONTRIBUTING.md — dev setup, project structure, PR checklist, stability tiers
- CHANGELOG.md — Keep-a-Changelog format, Unreleased section covers all phases
- README updated: subcommand syntax in Quick Start, enhanced library section with examples table, new Development section
… and Advisory: core2 yanked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.