package ctypes

  1. Overview
  2. Docs
Combinators for binding to C libraries without writing any C

Install

Dune Dependency

Authors

Maintainers

Sources

0.23.0.tar.gz
sha256=cae47d815b27dd4c824a007f1145856044542fe2588d23a443ef4eefec360bf1
md5=b1af973ec9cf7867a63714e92df82f2a

doc/ctypes.stubs/Cstubs_inverted/index.html

Module Cstubs_invertedSource

Operations for exposing OCaml code as C libraries.

Sourcemodule type INTERNAL = sig ... end
Sourcemodule type BINDINGS = functor (F : INTERNAL) -> sig ... end
Sourceval write_c : Format.formatter -> prefix:string -> (module BINDINGS) -> unit

write_c fmt ~prefix bindings generates C stubs for the functions bound with internal in bindings. The stubs are intended to be used in conjunction with the ML code generated by write_ml.

The generated code uses definitions exposed in the header file cstubs_internals.h.

Sourceval write_c_header : Format.formatter -> prefix:string -> (module BINDINGS) -> unit

write_c_header fmt ~prefix bindings generates a C header file for the functions bound with internal in bindings. The stubs are intended to be used in conjunction with the C code generated by write_c.

Sourceval write_ml : Format.formatter -> prefix:string -> (module BINDINGS) -> unit

write_ml fmt ~prefix bindings generates ML bindings for the functions bound with internal in bindings. The generated code conforms to the INTERNAL interface.

The generated code uses definitions exposed in the module Cstubs_internals.

OCaml

Innovation. Community. Security.