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

Conflicts (2)

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

Innovation. Community. Security.