Expand description
FFI (Foreign Function Interface) Support
This module handles parsing of FFI manifests and generating the LLVM IR for calling external C functions from Seq code.
FFI is purely a compiler/linker concern - the runtime remains free of external dependencies.
§Usage
include ffi:libedit
: repl ( -- )
"prompt> " readline
dup string-empty not if
dup add-history
process-input
repl
else
drop
then
;Structs§
- FfiArg
- An argument to an FFI function
- FfiBindings
- Resolved FFI bindings ready for code generation
- FfiFunction
- A function binding in an FFI manifest
- FfiFunction
Info - Information about an FFI function for code generation
- FfiLibrary
- A library binding in an FFI manifest
- FfiManifest
- Top-level FFI manifest structure
- FfiReturn
- Return value specification
Enums§
- FfiType
- FFI type mapping for C interop
- Ownership
- Memory ownership annotation for return values
- Pass
Mode - Argument passing mode
Constants§
- LIBEDIT_
MANIFEST - Embedded libedit FFI manifest (BSD-licensed)
Functions§
- get_
ffi_ manifest - Get an embedded FFI manifest by name
- has_
ffi_ manifest - Check if an FFI manifest exists
- list_
ffi_ manifests - List all available embedded FFI manifests