Skip to content

feat: ✨ add the helpers Folioscope asked for - #32

Merged
baxyz merged 7 commits into
mainfrom
feat/folioscope-requests
Oct 28, 2026
Merged

baxyz merged 7 commits into
mainfrom
feat/folioscope-requests

Conversation

@baxyz

@baxyz baxyz commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

What

The helpers that Folioscope asked for (helpers4-requests.md), for the Rust crate. No new dependency.

Module Added
geometry SVG path data: parse_path (PathCommand, ParsePathError), format_path, transform_path, rounded_rect_path, ellipse_path; Matrix::rect_to_rect
bytes media_type_of (magic bytes) and media_type_of_path
color blend with all sixteen CSS BlendModes, premultiply, unpremultiply, Hsb and Rgb::to_hsb, Rgba::from_unit / to_unit (0–1 float channels)
string match_glob_ignore_case, parse_pattern (/source/flags or glob, as a Pattern: the crate has no regex engine)
kiwi (new, feature kiwi, needs bytes) Schema::parse reads a binary Kiwi schema, Schema::decode decodes a message into a dynamic Value; precise KiwiErrors, allocation limits, nesting limit
font (new, feature font) pick_closest (CSS Fonts 4 matching, variable faces cover a weight range), weight_of_style, is_italic, split_postscript, same_family, read_font (TrueType, OpenType, collections, WOFF)

Decisions to review

  • Kiwi: our own decoder, not kiwi-schema. The request wrote Schema::decode(bytes) and schema.decode(message, "Message"), which cannot share a name: the schema reader is Schema::parse.
  • WOFF2 is not supported (FontError::UnsupportedWoff2). Its tables are Brotli-compressed, and a Brotli decoder needs its 122 KB static dictionary. WOFF (1.0) works, with an in-crate zlib inflate.
  • read_font has no sub-feature, since it needs no dependency.

Checks

cargo fmt --check, clippy --all-targets --all-features -D warnings (and per feature), cargo test --all-features on stable and 1.85, cargo llvm-cov at 100% lines, functions and regions, RUSTDOCFLAGS=-D warnings cargo doc, scripts/coherency.py. Not run locally: typos, cargo machete, cargo hack, cargo deny, cargo semver-checks.

🤖 Generated with Claude Code

baxyz and others added 6 commits October 28, 2026 18:11
parse_path, format_path, transform_path, rounded_rect_path, ellipse_path
and Matrix::rect_to_rect, as in the TypeScript package.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
BlendMode and blend (all sixteen CSS modes), premultiply and
unpremultiply, the Hsb type with Rgb::to_hsb, and Rgba::from_unit and
to_unit for the 0-1 float channels of design tools.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new kiwi module (feature kiwi, on bytes): Schema::parse reads a binary
schema, Schema::decode turns a message into a dynamic Value, with precise
errors, allocation limits and a nesting limit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new font module (feature font): pick_closest (CSS Fonts 4 matching, with
variable faces), weight_of_style, is_italic, split_postscript, same_family
and read_font, which reads TrueType, OpenType, collection and WOFF files
with its own inflate. WOFF2 needs Brotli and is reported as unsupported.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ PR Validation Passed

All checks passed!


📋 Pipeline Status

Job Status
✅ 🏗️ Build passing
✅ 🧪 Tests passing
✅ 🌐 Compatibility passing
✅ 📝 Lint passing
✅ 📚 Docs passing
✅ 🔐 Security Audit passing
✅ 🧬 Semver passing
✅ 🧾 Conventional Commits passing

📊 Code Coverage

✅ Overall Coverage: 100.0% — Target reached! 🎯

Metric Progress Coverage
✅ Lines ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
✅ Functions ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
✅ Regions ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%

🌐 Compatibility

✅ OS × toolchain (stable, beta, MSRV 1.85) · feature powerset · wasm32


🧬 Mutation Testing

⏭️ Mutation testing: skipped (no source change)

🧬 Informational only, does not block the PR — cargo-mutants, scoped to the lines this PR touches


⏱️ Benchmarks

✅ Benchmarks: 30 measured — no regression against the base

⏱️ Informational only, does not block the PR — criterion, compared with the base branch on the same runner


ℹ️ About this report
  • 🎯 Coverage target: 100% of lines, functions and regions, measured by cargo-llvm-cov (test files excluded)
  • 🧬 Mutation testing and ⏱️ benchmarks are informational and never block the PR
  • 🔄 This comment updates automatically with each push

🤖 Generated by @helpers4 CI • 2026-10-28

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@baxyz
baxyz merged commit 152d8a1 into main Oct 28, 2026
32 checks passed
@baxyz
baxyz deleted the feat/folioscope-requests branch October 28, 2026 18:42
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