Version française
Home     About     Download     Resources     Contact us    
Browse thread
Easier FFI
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Benjamin <dave@r...>
Subject: Re: [Caml-list] Easier FFI
Jon Harrop wrote:
> For example, why can't we have a generic FFI library that allows us to use any 
> external library (unsafely) without leaving OCaml? Then we could write or 
> generate our bindings entirely in OCaml and forget about these C stubs.

I would love something like this. I've used "ctypes", a similar library 
for Python, a few times, and it has really come in handy. Not something 
I want to use often (at least not directly), but for those times when 
use of an unsupported C library is necessary, it's so nice to have the 
ability to stay within the language rather than writing a bunch of 
wrapper code. I wonder if something like ctypes would translate well to 
a statically typed language like OCaml.

http://starship.python.net/crew/theller/ctypes/