binding tool for C libs

Gour gour at atmarama.net
Mon Jan 23 05:15:55 PST 2012


On Sun, 22 Jan 2012 22:03:08 +0400
Denis Shelomovskij <verylonglogin.reg at gmail.com> wrote:

> I'm finishing a fast (I just don't see a faster way) and garbage-free 
> CTFE-capable wrapper. But it requires IDL to be written for every C 
> function.

I'm curious if you have read the following paper:

http://www.cse.unsw.edu.au/~chak/papers/Cha99b.html

describing C2Hs tool used to provide bindings for C libraries for
Haskell?

From the abstract: "The tool obtains information about the C data type
definitions and function signatures by analysing the C header files of
the library. It uses this information to compute the missing details in
the template of a Haskell module that implements a Haskell binding to
the C library. Hooks embedded in the binding file signal where, which,
and how C objects are accessed from Haskell. The Haskell code in the
binding file determines Haskell type signatures and marshaling details.
The approach is lightweight and does not require an extra interface
description language."



Sincerely,
Gour

-- 
The senses, the mind and the intelligence are the sitting places 
of this lust. Through them lust covers the real knowledge of the 
living entity and bewilders him.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120123/5423067b/attachment-0001.pgp>


More information about the Digitalmars-d mailing list