Skip to content

patch: return compiled AST by value (no JSON) at the compile_program entry point#21

Merged
Boshen merged 1 commit into
mainfrom
patch-compile-program-by-value
Jun 6, 2026
Merged

patch: return compiled AST by value (no JSON) at the compile_program entry point#21
Boshen merged 1 commit into
mainfrom
patch-compile-program-by-value

Conversation

@Boshen

@Boshen Boshen commented Jun 6, 2026

Copy link
Copy Markdown
Member

Returns the compiled AST by value instead of serializing to JSON at the compile_program entry point.

…entry point

The oxc and swc front-ends were deserializing compile_program's JSON output
straight back into a File in the same process. Change CompileResult::Success.ast
to Option<File> and return it by value; both bindings use it directly, dropping
the serialize→deserialize round-trip.

Kept as ./patches/0001-*.patch and re-applied by `just patch` on every sync,
since the codemod only rewrites Cargo.toml. CompileResult still derives
Serialize, so the JS-shim path is unchanged. Verified: workspace compiles and
e2e output is byte-identical.
@Boshen
Boshen merged commit d60cc48 into main Jun 6, 2026
@Boshen
Boshen deleted the patch-compile-program-by-value branch June 6, 2026 17:14
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