[email protected]
[Top] [All Lists]

[C2hs] ANNOUNCE: c2hs 0.16.3

Subject: [C2hs] ANNOUNCE: c2hs 0.16.3
From: Duncan Coutts
Date: Thu, 24 Mar 2011 13:07:42 +0000

c2hs version 0.16.3 is out and is available from hackage

What is c2hs

c2hs is an FFI preprocessor tool, a bit like hsc2hs, that helps with the
development of Haskell bindings to C libraries.

The major advantages of using c2hs compared to writing foreign imports
by hand (or using hsc2hs) are:

  * Cross-language type safety:
        C functions are imported with the correct Haskell types.

  * Saves time:
        boilerplate marshaling code is generated.

It works by extracting interface information from C header files and it
generates Haskell code with foreign imports and marshalling.

Changes in this release

      * In and out marshallers may now have arguments, rather than just
        being single function names.
      * Foreign function imports will now use stdcall if the C headers
        specify this calling convention. This will help with bindings to
        some C libraries on Windows.
      * New {# alignof #} hook, like the existing {# sizeof #} hook.
        This is useful for the alignment in Storable instances.
      * Fewer marshalling functions are needed from the bundled C2HS
        module. The trend is towards eliminating the need for any
        axillary marshalling module.


Thanks to Jonathan Rockway, [email protected] and Dmitry Astapov for
contributions to this release.


Home page:

Bug tracker:


C2hs mailing list
[email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • [C2hs] ANNOUNCE: c2hs 0.16.3, Duncan Coutts <=