Repository navigation
feat: add zyzz/compiler/wasm for browser and worker graph compilation - #462
Conversation
Modules.decode rebuilds a module's frozen transform output without importing the engine, the native addon, or Lightning CSS, so hosts without the addon can decode graph output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RHtekb5wZczQ7TNkrfSspj
The package build writes the wasm crate's compiler feature build to binding/compiler.wasm, exported as zyzz/compiler.wasm. Graph.create from zyzz/compiler/wasm instantiates it from a compiled module or bytes, and its compile takes the web options of Graph.compile and returns the same output. Failures throw Graph.CompileError with the native error's name, message, and diagnostics. The docs playground compiles through it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RHtekb5wZczQ7TNkrfSspj
|
|
Site previewCommit: |
commit: |
Benchmark Report🟢 Zyzz passes the framework gate in all 11 workloads. Every workload compiles from fresh compiler state, including Lightning CSS minification and esbuild client bundling. Lower is better, bold marks the best result in each row, and the ratio beside each competitor compares its result with Zyzz. Compile TimeMean milliseconds per compilation.
CSS SizeGzip bytes of the minified stylesheet.
JS SizeGzip bytes of the bundled client JavaScript, including required runtime helpers.
Notes
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f28f390a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…he fixture Web module decoding moved from `Results.module` to `Modules.decode`, so `AdapterCache` reads V8 coverage for `Modules.decode` and `Results.nativeModule`, and fails only when neither appears. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RHtekb5wZczQ7TNkrfSspj
…iler.wasm The `src` target of the `./compiler.wasm` export was outside `files`, so a packed release resolved `zyzz/compiler.wasm` only under the `default` condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RHtekb5wZczQ7TNkrfSspj
Browsers and Cloudflare Workers could not compile source graphs. The package inlines only the CSS build of
crates/wasm, andzyzz/compilerimports the native addon and Lightning CSS. The docs playground built thecompilerfeature separately.pnpm buildnow writes that build tobinding/compiler.wasm, published aszyzz/compiler.wasm.Graph.createfromzyzz/compiler/wasminstantiates it from a compiled module or bytes, and itscompiletakes the web options ofGraph.compileand returns the same output. Failures throwGraph.CompileErrorwith the native error's name, message, and diagnostics. The entry imports no Node built-ins, and the docs playground compiles through it. The module is 5.4 MiB raw and 1.6 MiB gzip, and the inlined CSS engine is unchanged.The Regen design canvas (
tempoxyz/ds) uses this to compile token-checkedstyle()calls in designers' screens againstregen-ui's packed contracts.Validation:
vp test run src/compiler/wasm site/src/playground site/src/pages/Docs.test.tspasses, including parity with the native graph and a Chromium run of a browser bundle. Three print tests inTransform.test.tsfail identically onmainin the authoring container (WeasyPrint missing and one Chromium snapshot).Generated by Claude Code