Bun aims to support V8 APIs without using V8 by simulating V8's memory layout using JavaScriptCore (JSC) types. Key methods include representing tagged pointers, managing maps and objects, and ensuring that native modules precompiled for the V8 API still function properly. Additionally, Bun implements Node.js-style module registration, allowing easier writing and testing of native addons. Future work will address JSC's garbage collector interaction, representation of various JavaScript values, and other parts of the V8 compatibility layer.

19m read timeFrom bun.sh
Post cover image
Table of contents
Mimicking V8 Representation in JSCImplementing V8 Functions, Second AttemptNode.js-style Module RegistrationComing up
1 Comment

Sort: