You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bun-compat: implement the bun:jsc heapStats surface #9743
Perry's parity table lists the entire bun:jsc module as unsupported. Bun-target applications can use heapStats() for optional memory diagnostics, including through a dynamic import. Perry currently warns that bun:jsc cannot be resolved.
This issue intentionally covers only the small heapStats surface, not the profiler, debugger, or JSC optimization-control APIs.
bun:jsc resolves as a built-in in Bun-platform compilations without an unresolved-import warning.
Static import, await import("bun:jsc"), and require("bun:jsc") expose the same heapStats function.
heapStats() and the compatibility spelling heapStats(true) return the keys above.
Scalar counters are finite, non-negative numbers.
objectTypeCounts, protectedObjectTypeCounts, and mimalloc are objects whose reported counters are finite, non-negative numbers.
Values describe Perry's own heap/allocator where an exact JavaScriptCore concept does not exist; the implementation documents any intentionally approximate counters.
A compiled-binary test checks shape, types, monotonic sanity, and both argument forms without asserting machine-specific counts.
Upstream Bun uses this surface for leak diagnostics and its Node v8 compatibility layer.
Fixed by #9760, which landed on main via merge train #9798. The train was merged as its own branch, so the Fixes #9743 keyword in #9760 never fired — closing manually. Verified the fix is on main by patch-id (git cherry), not just by the PR being closed.
Activity
proggeramlug commentedon Sep 5, 2026
Fixed by #9760, which landed on
mainvia merge train #9798. The train was merged as its own branch, so theFixes #9743keyword in #9760 never fired — closing manually. Verified the fix is onmainby patch-id (git cherry), not just by the PR being closed.