Combinators for binding to C libraries without writing any C

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: 31 Mar 2022

Dependencies (8)

  1. bigarray-compat
  2. conf-ncurses with-test
  3. ounit with-test
  4. ctypes-foreign with-test
  5. lwt with-test & >= "3.2.0"
  6. ocamlfind build
  7. integers >= "0.3.0"
  8. ocaml >= "4.03.0"

Reverse Dependencies (129)

  1. ahrocksdb
  2. antic
  3. arakoon >= "1.8.6" & < "1.8.12"
  4. arb
  5. argon2
  6. async_ssl >= "v0.15.0"
  7. avroc
  8. bimage-unix
  9. binaryen_dsl
  10. calcium
  11. cf
  12. cmark
  13. cmarker
  14. ctypes-build
  15. ctypes-foreign >= "0.18.0"
  16. ctypes-zarith
  17. ctypes_stubs_js
  18. decompress >= "1.3.0"
  19. directories
  20. dlm >= "0.3.3"
  21. eigen >= "0.1.0"
  22. eris
  23. extism
  24. flint
  25. fsevents
  26. gdal >= "0.10.0"
  27. gobject-introspection
  28. gpiod
  29. gr
  30. guile
  31. hacl-star-raw >= "0.3.2"
  32. hardcaml-llvmsim >= "0.3.0"
  33. hardcaml-vpi
  34. hardcaml_c
  35. hardcaml_verilator
  36. hdr_histogram
  37. iocaml-kernel >= "0.4.4"
  38. kqueue < "0.2.0"
  39. libdash >= "0.3"
  40. libirmin
  41. libudev
  42. lilv
  43. llvm >= "3.7"
  44. lp-glpk
  45. lp-gurobi
  46. luv
  47. luv_unix
  48. lz4 >= "1.1.1"
  49. mariadb >= "1.1.2"
  50. memcpy >= "0.2.1"
  51. mmdb
  52. monocypher
  53. mpg123
  54. nanomsg
  55. nebula
  56. netlink >= "0.2.1"
  57. opasswd >= "1.3.1"
  58. opencc < "transition"
  59. opencc0
  60. opencc1
  61. opencc1_1
  62. orocksdb
  63. osbx < "1.1.1"
  64. osx-acl
  65. osx-attr >= "0.2.0"
  66. osx-cf >= "0.1.1"
  67. osx-fsevents >= "0.1.1"
  68. osx-membership
  69. osx-mount >= "0.1.1"
  70. osx-secure-transport
  71. osx-xattr >= "0.3.0"
  72. owl >= "0.9.0"
  73. pci
  74. pg_query
  75. pkcs11-driver
  76. pkcs11-rev
  77. portaudio_c_bindings
  78. portmidi
  79. posix-base
  80. posix-bindings
  81. posix-getopt >= "2.0.0"
  82. posix-signal
  83. posix-socket
  84. posix-socket-unix
  85. posix-time2
  86. posix-types
  87. posix-uname
  88. ppx_cstubs = "0.5.1" | >= "0.7.0"
  89. protocol-9p < "0.5.1"
  90. py >= "1.1"
  91. raygui
  92. raylib
  93. reed-solomon-erasure
  94. rfc1951 >= "1.3.0"
  95. sanlock
  96. sarek >= "20210823"
  97. sattools
  98. sodium >= "0.2.0" & < "0.3.0"
  99. spin >= "0.8.0"
  100. spoc >= "20170724"
  101. srt
  102. swipl
  103. sys-socket
  104. sys-socket-unix
  105. tensorflow
  106. tezos-hacl
  107. tezos-hacl-glue-unix < "11.0"
  108. tezos-sapling >= "11.1"
  109. tezos-wasmer
  110. tgls >= "0.8.3"
  111. torch
  112. tsdl >= "0.8.1"
  113. tsdl-image >= "0.3.0"
  114. tsdl-mixer
  115. tsdl-ttf >= "0.3"
  116. unix-errno >= "0.4.1" & < "0.5.0" | >= "0.6.0"
  117. unix-fcntl >= "0.3.3"
  118. unix-sys-resource
  119. unix-sys-stat
  120. unix-time
  121. unix-type-representations >= "0.1.1"
  122. wasmer
  123. wasmtime
  124. xxhash
  125. yaml
  126. yara
  127. yices2_bindings
  128. zstandard
  129. zstd >= "0.3"

Conflicts (1)

  1. mirage-xen >= "6.0.0"