`hs-bindgen` release preview: automatic binding generation from C headers

28 Likes

Looks exciting, I will definitely try it when I need to interface with C.

A comparison with hsc2hs could help explain the context. The blog post doesn’t even mention it.

1 Like

Yeah, that’s fair. There is a discussion of hsc2hs in the paper, section 7.2.1, “hsc2hs”. They way that I see it: with hsc2hs you are writing bindings, with some help from the tool to figure things out like offsets; with hs-bindgen, it generates the bindings, with some (mostly optional) help from you to specify preferences, name overrides, etc. The key difference is that hs-bindgen provides automatic binding generation, which is a much more ambitious goal than what hs2cs offers.

2 Likes