mirleft/ocaml-nocrypto — pull request #26 by pqwy (2014-08-04 18:15:28+00:00)
Title: Ctypes

Rework C interaction to use `ctypes` in stubs mode.

Time to redo bindings: **3 hours**.

Time to wrestle the build system: about **4 days**.

Shoutout to @samoht and @dbuenzli. Assemblage. The world needs it.

This won't work without `ctypes >= 0.3.3`. It is also potentially unsafe before the bounds check [patch](https://github.com/mirage/ocaml-cstruct/pull/33) enters `cstruct` as it now assumes that any `Ctypes.t` can only be well-formed with respects to its buffer, and happily does [pointer arithmetic](https://github.com/mirleft/ocaml-nocrypto/blob/f00bcc2719fa3b98affb0f95f3b9ee7a00b7651b/src/native.ml#L13) without checking again.