Show HN: Hsrs – Type-Safe Haskell Bindings Generator for Rust
Source: Hacker News
Introduction
Hey everyone! I’ve been working on hsrs, a type‑safe Haskell bindings generator for Rust.
I couldn’t find any existing generator that creates type‑safe, rich bindings for Haskell from Rust. Both languages have powerful type systems, so I was surprised such a tool didn’t already exist. That’s why I decided to write my own. hsrs feels very similar to pyo3 and napi‑rs, and if you’ve used those, hsrs will feel right at home.
What Makes hsrs Different
- Generates type‑safe bindings for rich types such as
Result,Maybe, etc. - Produces Haskell bindings directly (unlike
hs‑bindgen).
Resources
- Minimal example and more details are available in the Haskell Discourse announcement: