9.1. FFI

The FFI system allows you to load C-compatible libraries and call their functions from Halon script (HSL). It supports most of the C ABI, including basic data types, references, pointers, callback functions, and more. The method of using FFI to extend HSL (or any other language) is often the prefered method when working with an already existing library.

To learn how to use FFI, see the Halon script manual’s FFI class section.

Note

The scripting.ffi setting needs to be enabled before you can start using the FFI class.