[ocaml-ctypes] Using Cstubs.Types.TYPE and Cstubs.FOREIGN coherently

Anil Madhavapeddy anil at recoil.org
Mon May 4 14:15:13 BST 2015


On 4 May 2015, at 06:04, Jeremy Yallop <yallop at gmail.com> wrote:
> 
> I wonder if it'd be useful for the Ctypes package to include some
> reusable ocamlbuild rules to make this kind of thing easier.

Creating a standard ocamlbuild plugin would be useful given the recent
addition of -plugin-tags to ocamlbuild.

Eliom uses this quite nicely here:
https://ocsigen.org/eliom/manual/workflow-compilation#h5o-3

to let this work:

    ocamlbuild -use-ocamlfind -plugin-tags "package(eliom.ocamlbuild)" \
      yourlib.cma yourlib.cmxa yourlib.cmxs yourexecutable.js

A similar ctypes.ocamlbuild could also take additional _tags to
control the various build options perhaps.

Eliom source: https://github.com/ocsigen/eliom/tree/master/src/ocamlbuild

-anil


More information about the Ctypes mailing list