package ctypes

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

Install

Dune Dependency

Authors

Maintainers

Sources

0.20.1.tar.gz
sha256=78bf1acbc152a2e455a452e72eb75c3d4cefa366f2708cced3e7fe24b6278ec7
md5=91211baac16cb43134b1d6009b1edf92

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

Conflicts (2)

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

Innovation. Community. Security.