LogoClawIndex
CasesSkillsAbout
LogoClawIndex

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-11
FFILean 4CNative libraries

Capabilities

Define opaque typesDeclare extern functionsImplement C functionsRegister external classes

Typical Inputs

C codeLean 4 codeNative libraries

Typical Outputs

FFI bindingsCompiled shared librariesLean external objects

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

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.