From: Jeremy Yallop <yallop@gmail.com>
To: ctypes <ctypes@lists.ocaml.org>, Caml List <caml-list@inria.fr>
Subject: [Caml-list] ANN: ocaml-ctypes 0.5.0, a library for calling C functions directly from OCaml
Date: Mon, 21 Mar 2016 19:42:05 +0000 [thread overview]
Message-ID: <CAAxsn=GhYA9fF=SEvPBco4fPA8_mfw=WgUP6PxoeNKC7qQ-16g@mail.gmail.com> (raw)
I'm pleased to announce release 0.5.0 of ocaml-ctypes, which is now
available on OPAM.
== About ocaml-ctypes ==
The ocaml-ctypes library makes it possible to call C functions from
OCaml without writing any C code. The core of the library is a set of
combinators for describing C types -- scalars, functions, structs,
unions, arrays, and pointers to values and functions. Type
descriptions can then be used to bind native functions and values.
Here's a simple example:
# let puts = foreign "puts" (string @-> returning int);;
val puts : string -> int = <fun>
# puts "Hello, world!";;
Hello, world!
Ctypes includes many more features, including functions for retrieving
constants, values and details about object layout from C, a way of
building C libraries from OCaml modules, and a variety of binding
strategies such as dynamic linking and static stub generation. Further
information is available at the links below:
Tutorial: https://github.com/ocamllabs/ocaml-ctypes/wiki/ctypes-tutorial
Examples: https://github.com/ocamllabs/ocaml-ctypes/tree/master/examples
Some packages using ctypes:
http://opam.ocaml.org/packages/ctypes/ctypes.0.5.0/
API documentation: http://ocamllabs.github.io/ocaml-ctypes/
Github repository: https://github.com/ocamllabs/ocaml-ctypes
Direct download:
https://github.com/ocamllabs/ocaml-ctypes/archive/0.5.0.tar.gz
== Selected new features in 0.5.0 ==
* Improved support for various standard C and POSIX integer types
(time_t, ssize_t, ptrdiff_t, intptr_t, uint8_t, and many more).
* Improved support for conversions between function pointers and other
pointer types
* Support for releasing the runtime lock in the Cstubs_inverted module.
* An experimental interface for managing OCaml roots.
See the release notes for the full list of changes:
https://github.com/ocamllabs/ocaml-ctypes/blob/0.5.0/CHANGES.md
== Thanks ==
I'm grateful to Andreas Hauptmann, David Sheets, Etienne Millon,
Goswin von Brederlow, Leonid Rozenberg, @orbitz, Max Mouratov, and
Peter Zotov for contributions to this release.
next reply other threads:[~2016-03-21 19:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 19:42 Jeremy Yallop [this message]
2016-03-22 10:12 ` sp
2016-03-22 11:08 ` Jeremy Yallop
2016-03-22 10:20 ` Goswin von Brederlow
2016-03-22 11:11 ` Jeremy Yallop
2016-03-22 15:00 ` Gabriel Scherer
2016-03-22 15:07 ` Jeremy Yallop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAxsn=GhYA9fF=SEvPBco4fPA8_mfw=WgUP6PxoeNKC7qQ-16g@mail.gmail.com' \
--to=yallop@gmail.com \
--cc=caml-list@inria.fr \
--cc=ctypes@lists.ocaml.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox