mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
Run React Compiler snapshots on a 16 MiB stack so deeply nested fixtures do not overflow on s390x, fixing the [big-endian CI failure](https://github.com/oxc-project/oxc/actions/runs/40842717324/job/123342724293). Created with Codex assistance.
Oxc React Compiler
oxc integration for the Rust port of the React Compiler.
Overview
This crate owns the oxc ↔ react_compiler_ast (Babel) conversion layer and runs the React
Compiler over an oxc AST, memoizing React components and hooks. The compiler core crates are
front-end agnostic (they never depend on oxc), so they are consumed from crates.io as a published
fork; the AST and scope conversion lives here, written against the live oxc AST.
Ambient TypeScript variable declarations are erased from compiled functions. Their references remain external values rather than runtime locals, hoisted bindings, or captured context.
API
compile— run the compiler and return aCompileResultwith the rewrite to apply (viaCompileOutput::transform) plus diagnostics.lint— report diagnostics only, without emitting code; each finding is tagged with itsErrorCategory.PluginOptions— configure which functions are compiled and how.