Skip to content

chore: trim down the rust code#28

Draft
bengl wants to merge 1 commit intonodejs:mainfrom
bengl:bengl/trim-the-rust
Draft

chore: trim down the rust code#28
bengl wants to merge 1 commit intonodejs:mainfrom
bengl:bengl/trim-the-rust

Conversation

@bengl
Copy link
Member

@bengl bengl commented Nov 12, 2025

Removes the swc and swc_core crates, depending on their internals
directly, and inlining code where it doesn't come from a dependency.

Also override swc_compiler_base to tree-shake dependencies unnecessary
in orchestrion-js.

Also override regex since it's not actually used, but adds a ton of
code to the generated binaries.

This cuts the size of the WebAssembly file, and therefore the whole npm package, by almost half.

Removes the `swc` and `swc_core` crates, depending on their internals
directly, and inlining code where it doesn't come from a dependency.

Also override `swc_compiler_base` to tree-shake dependencies unnecessary
in orchestrion-js.

Also override `regex` since it's not actually used, but adds a ton of
code to the generated binaries.
@bengl bengl force-pushed the bengl/trim-the-rust branch from 0093c12 to fd4e795 Compare November 12, 2025 14:18
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