perf(loader): dispatch parallel loaders from Rust - #15363
Draft
intellild wants to merge 1 commit into
Draft
Conversation
intellild
force-pushed
the
codex/rust-loader-direct-mpmc
branch
from
August 28, 2026 02:34
38a1990 to
1d3fe07
Compare
Contributor
📦 Binary Size-limit
❌ Size increased by 84.13KB from 68.24MB to 68.32MB (⬆️0.12%) |
Contributor
Rsdoctor Bundle Diff Analysis
Found 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
intellild
force-pushed
the
codex/rust-loader-direct-mpmc
branch
from
August 28, 2026 13:17
2eed0b5 to
70c6e24
Compare
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.
Summary
recvagain.NormalModulethrough native-backed accessors so parallel execution does not copy the module or bulk context state through the JavaScript main thread.Rule.use.optionsin a compiler-owned map on the JavaScript main thread. Native code carries only au32handle; a worker requests the value over its existingMessagePort, ordinary values use structured clone, and functions continue to use the synchronousSharedArrayBuffer + Atomicsbridge.Execution flow:
Loader options flow:
For example, a Babel loader cache hit no longer requires the main JavaScript thread to materialize and forward the parallel loader payload or serialize the options object through V8. A non-parallel loader still receives the original options object identity, while a parallel loader receives a worker-local structured clone with
Map, typed arrays, URLs, and function options preserved by the bridge.Related links
task.md.Checklist
Validation:
cargo check -p rspack_binding_api -p rspack_core -p rspack_loader_runner -p rspackcargo test -p rspack --test loader --no-runpnpm run build:binding:devpnpm run build:jspnpm exec rs check --type-checkpnpm run test -t "configCases/loader-parallel"(62 tests passed)by OpenAI Codex