Using C libraries in Haskell with Cabal

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. 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.

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. 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).

  4. raylib-haskell

    Haskell bindings to raylib

    There are some projects on github which might help: https://github.com/DevJac/raylib-haskell

  5. raylib-hs

    https://github.com/danielc777888/raylib-hs (my own)

  6. 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](https://github.com/rethab/bindings-dsl/wiki). I haven't tried anything similar myself, but would also be interested if this would be feasible.

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

  • Microsoft wins FTC fight to buy Activision Blizzard

    3 projects | /r/gaming | 11 Jul 2023
  • Got into Jai closed beta on March 2026

    2 projects | news.ycombinator.com | 7 May 2026
  • MiniScript Weekly News — April 30, 2026

    3 projects | dev.to | 30 Apr 2026
  • Raylib v6.0

    3 projects | news.ycombinator.com | 23 Apr 2026
  • MiniScript Weekly News — Apr 9, 2027

    3 projects | dev.to | 9 Apr 2026