Skip to content

Use embedded Manifold browser runtime - #956

Draft
seveibar wants to merge 1 commit into
mainfrom
agent/use-manifold-2d-runtime
Draft

Use embedded Manifold browser runtime#956
seveibar wants to merge 1 commit into
mainfrom
agent/use-manifold-2d-runtime

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Summary

  • replace the runtime jsDelivr loader for manifold-3d@3.2.1 with @tscircuit/manifold-2d@0.0.4
  • use the embedded-WASM browser-safe initializer while preserving support for an existing injected Manifold module
  • migrate Manifold type imports to the vendored package
  • add an actual Chromium regression test and required CI workflow

Root cause

CadViewerManifold injected a module script that imported manifold-3d from jsDelivr. Runframe bundles 3d-viewer into its standalone preview, and tscircuit copies that standalone bundle, so the published tscircuit browser artifact still contained a live manifold-3d runtime dependency even after its npm dependency graph was cleaned.

Browser regression

The new test bundles the same loader used by the viewer for the browser, asserts the bundle contains no manifold-3d reference, launches headless Chromium, initializes the embedded WASM payload, creates a cube, and verifies geometry was produced.

Verification

  • bun run test:browser-manifold — passed in Chromium
  • bun run build
  • bun run test:node-bundle
  • bunx tsc --noEmit
  • bun run format:check
  • git diff --check
  • generated dist/index.js has no manifold-3d or jsDelivr Manifold reference
  • legacy Bun suite: 25 passed; 3 unrelated baseline expectation failures from current dependency drift (two faux-board thickness assertions and one SVG color assertion)

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
3d-viewer Ready Ready Preview, Comment Jul 12, 2026 1:43am

Request Review

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