c2hsc alternatives and similar packages
Based on the "Development" category.
Alternatively, view c2hsc alternatives based on common mentions on social networks and blogs.
-
criterion
A powerful but simple library for measuring the performance of Haskell code. -
structured-haskell-mode
Structured editing minor mode for Haskell in Emacs -
stgi
A user-centric visual STG implementation to help understand GHC/Haskell's execution model. -
cabal-install-parsers
Scripts and instructions for using CI services (e.g. Travis CI or Appveyor) with multiple GHC configurations -
inline-c
Write Haskell source files including C code inline. No FFI required. -
inline-java
Haskell/Java interop via inline Java code in Haskell modules. -
fourmolu
A fourk of ormolu that uses four space indentation and allows arbitrary configuration. Don't like it? PRs welcome! -
gi-atk
Generate Haskell bindings for GObject-Introspection capable libraries -
scion
OLD, DEPRECATED: Use this instead https://github.com/haskell/haskell-ide-engine -
lambdabot-core
A friendly IRC bot and apprentice coder, written in Haskell.
Access the most powerful time series database as a service
Do you think we are missing an alternative of c2hsc or a related project?
Popular Comparisons
README
Converts C API header files to .hsc
and .hsc.helper.c
files
Usage: c2hsc --prefix=<Lib Prefix> <FILE>.h
This will create <FILE>.hsc
, and <FILE>.hsc.helper.c
if the header file
contains inline functions.
For example, in hlibgit2
on the Mac I'm using:
c2hsc --prefix=Bindings.Libgit2 --cppopts=-U__BLOCKS__ \
libgit2/include/git2/tree.h
Known issues:
- Need to output vararg functions with a comment mentioning they are not translatable to the Haskell FFI
Also, please note that this tool will never be 100% accurate. It cannot
translate macros, or anything related to the preprocessor, for example. It
often misses necessary #include
files, and will get them wrong in any case
if preprocessor conditionals are involved.
The goal of c2hsc
is to solve the hardest 80% of the problem of creating an
FFI library. The remaining 20%, plus validation of the results, is an
exercise necessarily left to the user.