How Bun supports V8 APIs without using V8 (part 2)
Bun emulates V8's memory layout on top of JavaScriptCore so that precompiled native addons, which inline V8 functions assuming specific pointer layouts, keep working.
Bun emulates V8's memory layout on top of JavaScriptCore so that precompiled native addons, which inline V8 functions assuming specific pointer layouts, keep working.
Bun, which runs on JavaScriptCore, implements a growing subset of V8's C++ embedding API so Node.js native modules like cpu-features load without V8.
Bun v1.1.29 adds N-API support to its `cc` C compilation feature, letting C code return JavaScript strings, objects and arrays, which also works for shared libraries loaded via `dlopen` in `bun:ffi`.
Bun v1.1.28 adds experimental `cc` in `bun:ffi`, which uses TinyCC to compile, link and relocate C in memory and generates inline wrappers that convert between JavaScriptCore values and C primitives with no dynamic dispatch.