Skip to content

Add experimental TSRX compiler frontends - #3086

Draft
ryansolid wants to merge 8 commits into
nextfrom
tsrx-frontend
Draft

Add experimental TSRX compiler frontends#3086
ryansolid wants to merge 8 commits into
nextfrom
tsrx-frontend

Conversation

@ryansolid

@ryansolid ryansolid commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

  • add first-class .tsrx syntax routing to both @solidjs/babel-plugin and @solidjs/compiler
  • lower TSRX control flow, statement containers, dynamic tags, and lazy destructuring through the existing Solid JSX pipelines with shared parity/runtime coverage
  • compile scoped <style> blocks into scoped CSS sidecars and class maps without browser runtime helpers
  • support composing lowered .tsrx modules with Solid's function-level \"use server\" transform while preserving path-stable IDs
  • document current experimental constraints, including omitted native TSRX source maps until projection mappings can be represented accurately

Vite integration: solidjs/solid-vite-plugin#333

Test plan

  • pnpm --filter @solidjs/babel-plugin test
  • pnpm --filter @solidjs/compiler test
  • Rust tests with default, no-default, and TSRX-only feature configurations
  • Clippy with warnings denied across feature configurations
  • Babel/native TSRX output, runtime, lazy-binding, directive, and scoped-style oracle parity tests
  • Vite integration verified against both compiler backends

Release plan

Keep this PR in draft while the current Solid release is prepared. Rebase onto the post-release next branch and refresh the experimental parser pins before marking it ready.

Made with Cursor

ryansolid and others added 5 commits August 25, 2026 16:09
.tsrx sources desugar TSRX constructs into the shared Solid JSX lowering
in @solidjs/babel-plugin (via @tsrx/core) and @solidjs/compiler (via a
pinned oxc-tsrx text projection), with byte-parity enforced by the
fixture corpus and parity harness. Also fixes DOM insert markers to ride
the following sibling's declared walk variable, matching Babel.

Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise Unicode spans, lexical traps, nested backend lowering, accessor
scope, and early-error constraints so the shared corpus catches frontend
drift. Rewrite lazy binding update targets in the native compiler to match
the Babel frontend.

Co-authored-by: Cursor <cursoragent@cursor.com>
Execute the same authored fixtures through Babel and Oxc against the real
Solid DOM and SSR runtimes, asserting reactive updates, keyed identity,
events, lazy writes, branches, and empty fallbacks independently of
code-generation parity.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add full lazy destructuring semantics and close parser parity gaps so both frontends support expression containers, accessor-backed patterns, and lazy arrow parameters.

Co-authored-by: Cursor <cursoragent@cursor.com>
Compile TSRX style blocks into parity-tested scoped CSS sidecars across Babel and native pipelines without runtime helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 66cce98

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@solidjs/compiler Major
@solidjs/babel-plugin Major
test-integration Patch
solid-js Major
@solidjs/web Major
@solidjs/html Major
@solidjs/h Major
@solidjs/universal Major
@solidjs/element Major
@solidjs/signals Major
@solidjs/diagnostics Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
signals: core floor (createSignal/Memo/Effect/Root/flush) 7.59 KB (0%)
signals: + createStore 13.22 KB (0%)
signals: + isPending/latest 9.53 KB (0%)
app: render + one signal (the simple-app floor) 10.24 KB (0%)
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 16.9 KB (0%)
app: hydrating + every store primitive family 24.33 KB (0%)
app: CSR with Show/For/Loading/Errored/lazy 12.34 KB (0%)
frames: eager client consumer (frames client + transport, lazy codec) 10.6 KB (0%)

@coveralls

coveralls commented Aug 28, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 33159014288

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 72.216%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 996
Covered Lines: 767
Line Coverage: 77.01%
Relevant Branches: 782
Covered Branches: 517
Branch Coverage: 66.11%
Branches in Coverage %: Yes
Coverage Strength: 14.64 hits per line

💛 - Coveralls

@codspeed-hq

codspeed-hq Bot commented Aug 28, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 136 untouched benchmarks
⏩ 132 skipped benchmarks1


Comparing tsrx-frontend (66cce98) with next (f422bf7)

Open in CodSpeed

Footnotes

  1. 132 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

ryansolid and others added 2 commits August 27, 2026 22:25
Allow secondary compiler passes to retain the authored TSRX path so server-function IDs stay aligned with Vite's manifest.

Co-authored-by: Cursor <cursoragent@cursor.com>
Scope selectors against known elements instead of allowing unrelated selectors whenever a dynamic child is present.

Co-authored-by: Cursor <cursoragent@cursor.com>
Compose Oxc mappings through exact projection ranges while leaving generated scaffolding unmapped.

Co-authored-by: Cursor <cursoragent@cursor.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​tsrx/​core@​0.1.63941009799100

View full report

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.

2 participants