~/talk

Automatic C bindings generation for Haskell

Talkat Haskell 2025 · 2025-10-16..10-17· [compilers-and-language-design]
links:none on file
links:none on file
links:none on file
links:none on file
slides:none on file

hs-bindgen automatically generates GHC Haskell FFI bindings from C header files using libclang to get sizes offsets and AST details and emitting C wrapper functions with hashed names to meet C identifier limits. It preserves typedef semantics via generated newtypes and Storeable instances, offers binding specifications in JSON/YAML for prescriptive or compositional reuse, implements a DSL plus type inference for C macros, and produces modules covering pcap of about 156,000 bytes (~4,000 lines).

AI-written summary · about

  1. 0:00Introduction
  2. 1:47HS BindGen overview
  3. 3:13Manual bindings pain points
  4. 6:29Generated bindings demo
  5. 8:16Architecture and design
  6. 9:20C header parsing
  7. 10:23Naming conventions
  8. 13:12Customizing bindings
  9. 16:03Selecting declarations
  10. 18:15Handling C macros
  11. 20:42Pcap case study
  12. 23:11Future plans
  13. 23:32Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.