package ctypes

  1. Overview
  2. Docs
Combinators for binding to C libraries without writing any C

Install

Dune Dependency

Authors

Maintainers

Sources

0.20.0.tar.gz
sha256=c97fa72722e3931c917853a5b6c69c237edbd7739e44e46ee3b1c13f2e84a87a
md5=e286bc69e536e581529f01059dd4bbb3

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: 10 Dec 2021

Dependencies (4)

  1. bigarray-compat
  2. ocamlfind build
  3. integers >= "0.3.0"
  4. ocaml >= "4.03.0" & < "5.2"

Dev Dependencies (4)

  1. conf-ncurses with-test
  2. ounit with-test
  3. ctypes-foreign with-test
  4. lwt with-test & >= "3.2.0"

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

Conflicts (2)

  1. host-system-msvc
  2. mirage-xen >= "6.0.0"
OCaml

Innovation. Community. Security.