FE-514: Add SymPy β JavaScript compilation pipeline via Pyodide#8548
Draft
kube wants to merge 1 commit intocf/fe-514-compile-typescript-expressions-to-sympyfrom
Draft
FE-514: Add SymPy β JavaScript compilation pipeline via Pyodide#8548kube wants to merge 1 commit intocf/fe-514-compile-typescript-expressions-to-sympyfrom
kube wants to merge 1 commit intocf/fe-514-compile-typescript-expressions-to-sympyfrom
Conversation
Replace direct JS compilation with a SymPy intermediate representation: user TypeScript is compiled to SymPy Python, evaluated/simplified by real SymPy (via Pyodide WASM), then converted back to JavaScript for execution. - Add pyodide dependency and singleton manager for loading SymPy in worker - Create Python codegen module with custom JS printer for SymPy β JS - Create compile-via-sympy.ts orchestrating the full pipeline - Extend compile-to-sympy.ts with symbol tracking and Dynamics per-token body emission (no list comprehension for tokens.map) - Make buildSimulation async, using SymPy compilation pipeline - Add "compiling" progress messages and pyodideUrl support to worker - Update all simulation tests with vi.mock for async SymPy compilation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

π What is the purpose of this PR?
π Related links
π« Blocked by
π What does this change?
Pre-Merge Checklist π
π’ Has this modified a publishable library?
This PR:
π Does this require a change to the docs?
The changes in this PR:
πΈοΈ Does this require a change to the Turbo Graph?
The changes in this PR:
turbo.json's have been updated to reflect thisπΎ Next steps
π‘ What tests cover this?
β How to test this?
πΉ Demo