Demo code how to mix ctypes and "custom" OCaml types.
mpz_t/mpz_struct (C) is exposed as Z.t (OCaml) and mpq_struct as Q.t.
mpz_t
mpz_struct
Z.t
mpq_struct
Q.t
ctypes-zarith