Skip to content

Use hs-bindgen to generate bindings #99

@jorisdral

Description

@jorisdral

https://github.com/well-typed/hs-bindgen is a nifty new tool that can automate the process of writing Haskell bindings for C headers. Seeing as botan-bindings consists of mostly foreign import declarations, type definitions and utility pattern synonyms -- things that hs-bindgen generates automatically -- we can probably just generate most of the code for botan-bindings using hs-bindgen

Downside:

  • Reliance on an external tool introduces a point of failure
  • hs-bindgen is customisable in some parts, but not everywhere, so some fiddling with CPP will still be needed

Benefits:

  • Easy to create new bindings when a new version of the C++ library is released
  • The generated code has a consistent approach and style
  • Reduced maintenance cost

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions