C library interface
Factor documentation > Factor handbook
Prev:UI developer tools
Next:Libraries


Factor can directly call C functions in native libraries. It is also possible to compile callbacks which run Factor code, and pass them to native libraries as function pointers.

The C library interface is entirely self-contained; there is no C code which one must write in order to wrap a library.

C library interface words are found in the alien vocabulary and its subvocabularies.

Warning
C does not perform runtime type checking, automatic memory management or array bounds checks. Incorrect usage of C library functions can lead to crashes, data corruption, and security exploits.

Loading native libraries
Calling C from Factor
Calling Factor from C
Passing data between Factor and C
Struct classes
Accessing C global variables
Calling arbitrary assembly code
DLL handles
Embedding Factor into C applications