Skip to content

Add ergonomic typed extraction and rewrite APIs#1

Merged
bakgio merged 1 commit intomainfrom
ergonomic-api-layer
Apr 21, 2026
Merged

Add ergonomic typed extraction and rewrite APIs#1
bakgio merged 1 commit intomainfrom
ergonomic-api-layer

Conversation

@bakgio
Copy link
Copy Markdown
Owner

@bakgio bakgio commented Apr 21, 2026

Summary

This PR adds a thin ergonomic API layer on top of the existing low-level mp4forge primitives for common path-based extraction and rewrite workflows.

What changed

  • Added typed extraction helpers:
    • extract_box_as
    • extract_boxes_as
    • extract_boxes_as_with_registry
  • Added typed rewrite helpers:
    • rewrite_box_as
    • rewrite_boxes_as
    • rewrite_boxes_as_with_registry
  • Improved extraction and rewrite diagnostics to include matched path, box type, and byte offset for payload failures
  • Added high-level examples for the new helper layer while preserving the existing low-level examples
  • Added integration coverage for typed success paths, passthrough behavior, and contextual error reporting
  • Polished public docs and README coverage for the new helper surface
  • Bumped the crate to 0.2.0 and updated release-facing metadata and changelog
  • Added semver checking to CI as a release gate

Why

The low-level API was already solid, but common read/edit flows still required too much boilerplate. These helpers keep the existing architecture intact while making typical typed workflows easier to write, easier to read, and easier to debug.

@bakgio bakgio merged commit 9d67ae5 into main Apr 21, 2026
11 checks passed
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.

1 participant