ffi-bindings - Create FFI bindings between Lean 4 and C
Create Foreign Function Interface bindings between Lean 4 and C code
Tags
Updated: 2026-03-11Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Define opaque types
- Declare extern functions
- Implement C functions
- Register external classes
- Extract native pointers
- Create native objects
- Return tuples
- Handle errors
- Convert types
- Update build configuration
Inputs
- C code
- Lean 4 code
- Native libraries
- Build configuration
Outputs
- FFI bindings
- Compiled shared libraries
- Lean external objects
- Error messages
Requirements
- Lean 4 compiler
- C compiler
- Native libraries
