package ctypes

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.10.4.tar.gz
sha256=af968e9f47071574c08387d8701160543288c2f85f57ac8085807b2d6bd1368f
md5=846f9ce0638e9a2046a4771a4c47c2d8

Description

ctypes is a library for binding to C libraries using pure OCaml. The primary aim is to make writing C extensions as straightforward as possible.

The core of ctypes is a set of combinators for describing the structure of C types -- numeric types, arrays, pointers, structs, unions and functions. You can use these combinators to describe the types of the functions that you want to call, then bind directly to those functions -- all without writing or generating any C!

To install the optional ctypes.foreign interface (which uses libffi to provide dynamic access to foreign libraries), you will need to also install the ctypes-foreign optional dependency:

opam install ctypes ctypes-foreign

This will make the ctypes.foreign ocamlfind subpackage available.

Published: 09 May 2017

OCaml

Innovation. Community. Security.