Repository navigation
Conversation
Contributor
📦 Binary Size-limit
❌ Size increased by 15.94KB from 66.74MB to 66.76MB (⬆️0.02%) |
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
intellild
force-pushed
the
perf/remove-napi-compat-mode
branch
from
July 1, 2026 04:46
5cc5628 to
471dbf2
Compare
intellild
force-pushed
the
perf/remove-napi-compat-mode
branch
from
July 3, 2026 16:28
95b1c04 to
ad4db1c
Compare
intellild
force-pushed
the
perf/remove-napi-compat-mode
branch
from
July 6, 2026 05:54
ad4db1c to
e8e71b3
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.
What Changed
compat-modefrom the napi-related Rust dependencies.#[napi]getters/setters forModule,NormalModule,ExternalModule, and derived module wrappers.Object.hasOwn(...)behavior remains unchanged.skip_typescript, keeping the public TypeScript API owned bybanner.d.tsand avoiding generated duplicate declarations.create_function_from_closure.ThreadsafeJsValueRefoff the compat-onlynapi::Refpath.Why This Should Help
The previous module binding path generated a lot of repeated raw callback glue and per-module property setup. Module instances can be high-cardinality objects in loader/plugin hooks, so repeated accessor definitions and generic callback adapters are a poor place to spend binary size.
This keeps the JS-facing API stable while shifting the runtime accessors to napi-rs macro-generated registration and shared Rust helper methods. The remaining per-instance work is mainly descriptor copying for compatibility and the module identifier symbol.
Expected Benefit
rspack_binding_api.napi-binding.d.tsshape.by OpenAI Codex