Using C libraries in Haskell with Cabal

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Zigi - Close all those tabs. Zigi will handle your updates.
  • Scout APM - Truly a developer’s best friend
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • raylib

    A simple and easy-to-use library to enjoy videogames programming

    I am trying to use Raylib in my Haskell library with cabal. I can get it working with plain FFI and GHC, but when I try to convert it into a cabal project, it doesn't work.

  • hs-zstd

    Bindings to the Zstandard library to make it usable from the Haskell programming language.

    It kinda depends on how easy it is to build the C library, but assuming you can basically just list the files to point the C compiler at, yeah, it's not that hard to just include the C library in your project itself. The zstd library on Hackage does this (source on Github).

  • Zigi

    Close all those tabs. Zigi will handle your updates.. Zigi monitors Jira and GitHub updates, pings you when PRs need approval and lets you take fast actions - all directly from Slack! Plus it reduces cycle time by up to 75%.

  • raylib-haskell

    Haskell bindings to raylib

    There are some projects on github which might help:

  • raylib-hs (my own)

  • bindings-DSL

    Library and macros to simplify writing Haskell FFI code

    Maybe you could write a FFI-Library for Raylib with the help of [bindings-dsl]( I haven't tried anything similar myself, but would also be interested if this would be feasible.

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts