refactor(bindings)!: graphics.dat only through GraphicsArchive #442

Merged
jqueuniet merged 1 commit from feat/440-drop-free-graphics into main 2026-10-30 23:26:01 +01:00
Owner

Closes #440 (2/2). Stacked on the previous PR; retarget to main once it merges.

  • Removes the free graphics* functions and the tuple-addressed GraphicsArchive methods from dm2-convert, wasm, FFI and Python (+303 −1,803).
  • Breaking for the four that shipped in 0.6.0 (graphics_header_json, graphics_decode_png, graphics_decode_png_transparent, graphics_decode_icon_png): CHANGELOG Removed. The others never shipped; their Unreleased entries fold into one GraphicsArchive entry.
  • npm build passes --weak-refs, so a forgotten handle is freed by a FinalizationRegistry.
  • reads.rs keeps its assertions through local tuple-addressed helpers over the handle; the two tests comparing the handle against the removed functions are gone (equivalence checked in the previous PR).

Web editor migration:

  • graphicsHeaderJson → g.header()
  • graphicsDecodePngTransparent(b, c1, c2, c4) → g.image(g.find(c1, c2, 1, c4), {transparent: true})
  • graphicsDecodeIconPng(b, frames, ms, t) → g.icon(frames, {frame_ms: ms, transparent: t})

https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7

Closes #440 (2/2). Stacked on the previous PR; retarget to `main` once it merges. - Removes the free `graphics*` functions and the tuple-addressed `GraphicsArchive` methods from dm2-convert, wasm, FFI and Python (+303 −1,803). - Breaking for the four that shipped in 0.6.0 (`graphics_header_json`, `graphics_decode_png`, `graphics_decode_png_transparent`, `graphics_decode_icon_png`): CHANGELOG `Removed`. The others never shipped; their Unreleased entries fold into one `GraphicsArchive` entry. - npm build passes `--weak-refs`, so a forgotten handle is freed by a `FinalizationRegistry`. - `reads.rs` keeps its assertions through local tuple-addressed helpers over the handle; the two tests comparing the handle against the removed functions are gone (equivalence checked in the previous PR). Web editor migration: - `graphicsHeaderJson` → `g.header()` - `graphicsDecodePngTransparent(b, c1, c2, c4)` → `g.image(g.find(c1, c2, 1, c4), {transparent: true})` - `graphicsDecodeIconPng(b, frames, ms, t)` → `g.icon(frames, {frame_ms: ms, transparent: t})` https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
refactor(bindings)!: graphics.dat only through GraphicsArchive
All checks were successful
CI / msrv (1.90) (pull_request) Successful in 48s
CI / audit (pull_request) Successful in 13s
CI / python bindings (3.11) (pull_request) Successful in 34s
CI / stable (pull_request) Successful in 1m40s
CI / msrv (1.90) (push) Successful in 46s
CI / audit (push) Successful in 15s
CI / python bindings (3.11) (push) Successful in 34s
CI / stable (push) Successful in 1m40s
db7548541b
Drop the free graphics_* functions and the tuple-addressed
GraphicsArchive methods from dm2-convert, wasm, FFI and Python. Through
a handle a single call costs the same and every further call less, so
the free functions only doubled the surface. The npm build enables weak
refs so a forgotten handle is still freed.

Closes #440

Claude-Session: https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
jqueuniet changed target branch from feat/440-graphics-api to main 2026-10-30 23:24:21 +01:00
jqueuniet deleted branch feat/440-drop-free-graphics 2026-10-30 23:26:01 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools!442
No description provided.