Combinators for binding to C libraries without writing any C
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.
Install
copied = false, 2000)"
:class="{ 'border-gray-700': !copied, 'text-gray-100': !copied, 'focus:ring-orange-500': !copied, 'focus:border-orange-500': !copied, 'border-green-600': copied, 'text-green-600': copied, 'focus:ring-green-500': copied, 'focus:border-green-500': copied }">
Published
31 Mar 2022
Authors
Maintainers
Sources
0.20.1.tar.gz
md5=91211baac16cb43134b1d6009b1edf92
Dependencies
conf-ncurses
with-test
ounit
with-test
ctypes-foreign
with-test
lwt
with-test & >= "3.2.0"
ocamlfind
build
integers
>= "0.3.0"
ocaml
>= "4.03.0"
Reverse Dependencies
arakoon
>= "1.8.6" & < "1.8.12"
async_ssl
>= "v0.15.0"
ctypes-foreign
>= "0.18.0"
decompress
>= "1.3.0"
dlm
>= "0.3.3"
eigen
>= "0.1.0"
gdal
>= "0.10.0"
hacl-star-raw
>= "0.3.2"
hardcaml-llvmsim
>= "0.3.0"
iocaml-kernel
>= "0.4.4"
kqueue
< "0.2.0"
libdash
>= "0.3"
llvm
>= "3.7"
lz4
>= "1.1.1"
mariadb
>= "1.1.2"
memcpy
>= "0.2.1"
netlink
>= "0.2.1"
opasswd
>= "1.3.1"
opencc
< "transition"
osbx
< "1.1.1"
osx-attr
>= "0.2.0"
osx-cf
>= "0.1.1"
osx-fsevents
>= "0.1.1"
osx-mount
>= "0.1.1"
osx-xattr
>= "0.3.0"
owl
>= "0.9.0"
posix-getopt
>= "2.0.0"
ppx_cstubs
= "0.5.1" | >= "0.7.0"
protocol-9p
< "0.5.1"
py
>= "1.1"
rfc1951
>= "1.3.0"
sarek
>= "20210823"
sodium
>= "0.2.0" & < "0.3.0"
spin
>= "0.8.0"
spoc
>= "20170724"
tezos-hacl-glue-unix
< "11.0"
tezos-sapling
>= "11.1"
tgls
>= "0.8.3"
tsdl
>= "0.8.1"
tsdl-image
>= "0.3.0"
tsdl-ttf
>= "0.3"
unix-errno
>= "0.4.1" & < "0.5.0" | >= "0.6.0"
unix-fcntl
>= "0.3.3"
unix-type-representations
>= "0.1.1"
zstd
>= "0.3"
Conflicts
mirage-xen
>= "6.0.0"