Difference between revisions of "FFI imports packaging utility"
Line 9: | Line 9: | ||
=== Why Package FFI Imports === |
=== Why Package FFI Imports === |
||
− | Typically, when building a Haskell applications calling foreign functions from some library directly, |
+ | Typically, when building a Haskell applications calling foreign functions from some library directly, certain things are taken into consideration such as location of the library header files and the library itself. |
+ | The '''hsffig''' tool automatically preprocesses library header files and generates FFI import statements for all foreign functions (with few exceptions like variadic functions and functions taking/returning structures) as well as function declarations to access members of '''C''' structures and unions. |
||
− | * location of the library header files and the library itself |
||
+ | |||
− | * specific options given to |
||
+ | As a result of such automatic FFI import generation, substantial amount of Haskell code is created which in turn results in subatantial time to compile it. |
||
+ | |||
+ | The [http://www.haskell.org/cabal Cabal] tool assists in creation of packages. |
||
=== Command Line Options === |
=== Command Line Options === |
Revision as of 04:10, 28 January 2006
Note: This page contains a progressing draft of the documentation for an extension to HSFFIG to create Haskell packages for FFI imports. Once this page is complete this note will be removed. Dimitry Golubovsky
The FFI Packaging Utility
Abstract
This document contains user manual for the FFI Packaging Utility (ffipkg) which is an extension to HSFFIG.
Why Package FFI Imports
Typically, when building a Haskell applications calling foreign functions from some library directly, certain things are taken into consideration such as location of the library header files and the library itself.
The hsffig tool automatically preprocesses library header files and generates FFI import statements for all foreign functions (with few exceptions like variadic functions and functions taking/returning structures) as well as function declarations to access members of C structures and unions.
As a result of such automatic FFI import generation, substantial amount of Haskell code is created which in turn results in subatantial time to compile it.
The Cabal tool assists in creation of packages.