Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ocaml-ffi-demo

OCaml FFI Playground

Rationale

Writing traditional OCaml stubs is not always straightforward.
This repository provides three minimal examples to illustrate how OCaml can interact with C:

  • add: Passing primitive data between OCaml and C.
  • dot: Passing Bigarray between OCaml and C.
  • point: Managing a C struct through an OCaml stub using opaque pointers.

Requirements

  • ISO C compiler (e.g. GCC)
  • OCaml 4.14 or newer
  • GNU Make

License

MIT License © 2026 ByteBard