Bun FFI Bun's FFI allows calling native C/C++ libraries from JavaScript. Quick Start Loading Libraries Platform-Specific Paths Cross-Platform Loading FFI Types Function Definitions Working with Strings Working with Pointers Structs Callbacks Example: SQLite Memory Management Thread Safety Common Errors | Error | Cause | Fix | |-------|-------|-----| | | Wrong path | Check library path | | | Wrong function name | Check function export | | | Wrong FFI types | Match C types exactly | | | Memory error | Check pointer validity | When to Load References Load when: - Complex type conversions - Struc…