Skip to main content
Some C APIs expect function pointers as arguments. arkffi provides CFunction to wrap them.

Obtaining a Pointer

Creating a CFunction Wrapper

Lifecycle

Always close wrappers when done:

Passing to C APIs

Using JSCallback Instead

For TypeScript-to-C callbacks, use JSCallback: