Show HN: Hsrs – Type-Safe Haskell Bindings Generator for Rust

Published: (May 19, 2026 at 12:06 AM EDT)
1 min read

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:
0 views
Back to Blog

Related posts

Read more »

Performance of Rust Language [pdf]

Goal Rust is defined as a safe, low‑level, system programming language directly competing with C++. How much does it pay for safety in terms of performance? Ca...