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

Conflicts (2)

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

Innovation. Community. Security.