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

Si Beaumont simon.beaumont at citrix.com
Wed May 6 09:01:17 BST 2015


On Mon, 04 May 2015 at 14:04, Jeremy Yallop wrote:
> On 29 April 2015 at 12:40, Si Beaumont <simon.beaumont at citrix.com> wrote:
> It's not trivial, but it's certainly possible.  The async_ssl package
> is a useful example to work from; it binds various constants in the
> Ffi_bindings.types module:
> 
>    https://github.com/janestreet/async_ssl/blob/c58a80b7/bindings/ffi_bindings.ml#L1-L40
> 
> and uses ocamlbuild rules to set up the appropriate dependencies
> 
>    https://github.com/janestreet/async_ssl/blob/c58a80b7/myocamlbuild.ml
> 
> There's also a bit of _oasis set-up to build the executables:
> 
>    https://github.com/janestreet/async_ssl/blob/c58a80b7/_oasis#L84-L97
That's great! Thanks for the pointer. This was the kind of example I was
looking for.

> > My final bit of research landed me on an open Bountysource issue[6] on
> > which it looks like there's a plan to smooth this out to make the workflow more
> > like the stub generation for foreign function bindings:
> I've just pushed a branch with an implementation of this proposal.
> 
>    https://github.com/ocamllabs/ocaml-ctypes/pull/296
> 
> Feedback is very welcome!
Brilliant. I'll definitely give this a whirl later on this week. I'll try and
get a branch of my project building with this and update you on my experience.
Then, if and when this hits a ctypes release, we can merge it in.

Thanks,

- Si


More information about the Ctypes mailing list