package ctypes

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

Install

Dune Dependency

Authors

Maintainers

Sources

0.20.2.tar.gz
sha256=27915b753d1bd6cd3953057c0262246b1f7ce1c743557864a8a42b87bf05bb32
md5=cc68949d9cadc57f3682a97348137964

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: 21 Mar 2023

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

Conflicts (2)

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

Innovation. Community. Security.