Skip to main content

provides some shared utils for working with foreign function interfaces in Deno and Bun and a shim for bun.

This package works with Deno, Bun
This package works with Deno
This package works with Bun
JSR Score
70%
Published
2 months ago (0.0.0)
c
CString
No documentation available
f
cstring
No documentation available
c
FFIStruct
No documentation available
f
fromCString
No documentation available
f
fromWideString
No documentation available
c
MissingSymbolError

Represents an error that occurs when a symbol is missing in a library.

c
Ptr

Represents a platform-specific integer pointer.

f
ptr
No documentation available
c
WideString
No documentation available
f
wideString
No documentation available
I
FFIArgs
No documentation available
T
FFIKey
No documentation available
I
FFIReturn
No documentation available
I
FFIStrings
No documentation available
E
FFITypes
No documentation available
I
Ptr
No documentation available
T
TypedArray
No documentation available

bun

Enables the bun ffi module to be imported within modulesthat use the deno language server to providing cross runtimemodules that ship to jsr.io

v
CFunction
No documentation available
v
CString
No documentation available
v
default
No documentation available
v
dlopen
No documentation available
v
FFIType
No documentation available
T
Pointer
No documentation available
v
ptr
No documentation available
v
read
No documentation available
v
toArrayBuffer
No documentation available
f
CFunction

Turn a native library's function pointer into a JavaScript function

c
CString

Get a string from a UTF-8 encoded C stringIf byteLength is not provided, the string is assumed to be null-terminated.

f
dlopen

Open a library using "bun:ffi"

E
FFIType
No documentation available
I
FFITypeToArgsType
No documentation available
I
FFITypeToReturnsType
No documentation available
c
JSCallback

Pass a JavaScript function to FFI (Foreign Function Interface)

f
linkSymbols

Link a map of symbols to JavaScript functions

T
Pointer
No documentation available
f
ptr

Get the pointer backing a TypedArray or ArrayBuffer

N
read
No documentation available
f
read.f32

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.f64

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.i16

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.i32

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.i64

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.i8

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.intptr

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.ptr

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.u16

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.u32

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.u64

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

f
read.u8

The read function behaves similarly to DataView,but it's usually faster because it doesn't need to create a DataView or ArrayBuffer.

v
suffix

Platform-specific file extension name for dynamic libraries

f
toArrayBuffer

Read a pointer as an ArrayBuffer

f
viewSource

View the generated C code for FFI bindings

c
MissingSymbolError

Represents an error that occurs when a symbol is missing in a library.

c
CString
No documentation available
f
cstring
No documentation available
c
FFIStruct
No documentation available
f
fromCString
No documentation available
f
fromWideString
No documentation available
c
Ptr

Represents a platform-specific integer pointer.

f
ptr
No documentation available
c
WideString
No documentation available
f
wideString
No documentation available