Namespace "bun:ffi"

bun:ffi lets you efficiently call C functions & FFI functions from JavaScript without writing bindings yourself.

import {dlopen, CString, ptr} from 'bun:ffi';

const lib = dlopen('libsqlite3', {
});

This is powered by just-in-time compiling C wrappers that convert JavaScript types to C types and back. Internally, bun uses tinycc, so a big thanks goes to Fabrice Bellard and TinyCC maintainers for making this possible.

Index

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Generated using TypeDoc