Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/6931-callable-attach-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Binary size:** the per-module "attach" ladder inside `bound_native_callable_export_value` (stream prototype towers, sqlite/tty/tls/wasi/assert/crypto constructor decoration, EventEmitter statics, `util.promisify.custom`, `AsyncLocalStorage.bind`, …) is now a per-module `NM_ATTACH_REGISTRY`, registered by each module's existing `js_nm_install_<module>()`. A binary links exactly the attach machinery of the modules it imports: on a `console.log` hello world this finally dead-strips the stream pipeline tower, fs residue (161→27 KB), child_process (→0.9 KB), wasi (→0) and node:vm (→6.5 KB) — −133 KB on this branch so far. Verified byte-identical to Node: stream iteration, `promisify(stream.pipeline)` custom hook, `events.once`/EventEmitter statics, `AsyncLocalStorage.bind`, plus a 12-test gap sweep; full runtime suite green serially (the parallel flakes are #6926/known).
2 changes: 1 addition & 1 deletion crates/perry-runtime/src/object/native_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::ptr::null_mut;
use std::sync::atomic::{AtomicPtr, Ordering};

mod callable_export_check;
mod callable_exports;
pub(crate) mod callable_exports;
mod constants;
mod module_keys;
mod namespace_builders;
Expand Down
Loading
Loading