The Bun adapter uses Bun’s built-inDocumentation Index
Fetch the complete documentation index at: https://mine-27913f41.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
bun:ffi module to call the Zinc C ABI directly. No native addon compilation is needed. Bun loads libzinc_core at runtime through its FFI layer.
Installation
SharedRegion
create
open
buffer
Returns aBuffer backed by the shared memory mapping. Uses bun:ffi’s toBuffer function for zero-copy access.
notify
wait
true on notification, false on timeout.
close
Symbol.dispose for using statements:
Complete example
FFI details
The adapter defines FFI signatures for the 7 C ABI functions. Handles are represented asBigInt (64-bit pointers) in Bun’s FFI type system. The zinc_ptr function returns a pointer that toBuffer wraps into a Buffer without copying.
The library path is resolved relative to the adapter’s installation directory. If the library is not found, ensure libzinc_core.{so,dylib,dll} is on the standard library path.