Skip to content

fix(desktop): ship sharp's WebAssembly build so the Mac App Store scan passes - #44

Merged
MrCoder merged 2 commits into
mainfrom
fix/desktop-no-private-coretext
Nov 20, 2026
Merged

MrCoder merged 2 commits into
mainfrom
fix/desktop-no-private-coretext

Conversation

@MrCoder

@MrCoder MrCoder commented Nov 20, 2026

Copy link
Copy Markdown

PR review support materials

flowchart LR
  A[sharp 0.34.3] --> B[native @img/sharp-libvips-darwin-arm64]
  B -->|imports| C[_CTFontCopyDefaultCascadeList non-public CoreText]
  C -->|App Review 2.5.1| D[build 51 rejected]
  A --> E[this PR: @img/sharp-wasm32 + @emnapi/runtime, sha512 from bun.lock]
  E --> F[audit fails on non-public API; build 52 clean]
Loading

Before and After

No UI change.

Build 51 (rejected) Build 52 (this PR)
@img packages in the app sharp-darwin-arm64, sharp-libvips-darwin-arm64 sharp-wasm32
Files in the payload containing CTFontCopyDefaultCascadeList 1 (libvips-cpp.8.17.1.dylib, 2 byte matches) 0 of 42,296 files, scanned in the expanded signed .pkg
sharp resize + webp/jpeg/png output on a 1200x900 test image 580 / 2730 bytes, 33 ms 580 / 2730 bytes, 88 ms (about 2.7x slower)
Bundle audit passes rejects any Mach-O naming a flagged non-public API

What you must know

  • Every sharp-libvips release through 1.3.4 imports the symbol (checked 1.0.4, 1.1.0, 1.3.4), so upgrading does not help.
  • bun install --cpu=wasm32 is rejected by bun 1.3.10, so scripts/desktop-sharp-wasm.mjs fetches the two locked packages after install and checks their sha512 against bun.lock. Nothing is changed until both downloads verify.
  • Build number is now 52 in tauri.app-store.conf.json, commerce.rs and the packaging checks.

Summary

scripts/desktop-app-store.sh   + run desktop-sharp-wasm.mjs after bun install
scripts/desktop-sharp-wasm.mjs new: swap native sharp for locked wasm32
scripts/desktop-bundle-audit.mjs  + NON_PUBLIC_APIS check on every Mach-O

Evidence

  • Failing tests first: desktop-bundle-audit (non-public API) and desktop-sharp-wasm (swap, tamper, missing lock entry). Now 22 of 22 pass in desktop-packaging, desktop-bundle-audit and desktop-sharp-wasm. Three other script tests fail here only because this worktree has no node_modules.
  • Shipped bytes: sharp from the expanded .pkg payload loaded under Node 22.22.3 and produced the sizes above.
  • testflight.py check on the signed package: com.zenuml.app 1.1.0 (52), source commit 563cb27.

Merge Danger

Door: two-way

Image processing moves to WebAssembly in the Mac App Store build only.

Blast Radius: thumbnail, background, screenshot and image-description generation in the desktop app; slower, same output.

🤖 Generated with Claude Code

MrCoder and others added 2 commits November 20, 2026 22:01
…n passes

App Review rejected 1.1.0 build 51 (Guideline 2.5.1): sharp's native libvips
imports the non-public CoreText function _CTFontCopyDefaultCascadeList. Every
sharp-libvips release through 1.3.4 still does. The packaging step now removes
the native sharp packages and installs the lockfile-pinned @img/sharp-wasm32 and
@emnapi/runtime, verified by sha512. Same image output, about 2.7x slower.

The bundle audit now fails when any Mach-O in the app references a non-public
Apple API App Review has flagged. Bump the build to 52.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MrCoder
MrCoder merged commit d9450f7 into main Nov 20, 2026
15 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