# Hsrs – Type-Safe Haskell Bindings Generator for Rust

Hey everyone! I've been working on hsrs, a type-safe Haskell Bindings Generator for Rust. I couldn't really find any bindings generator that would create type-safe, rich bindings for Haskell from Rust. Naturally, both languages have rich type systems, so I was amazed that no awesome bindings genera…

- **Page:** https://magpie.gallery/i/hsrs-type-safe-haskell-bindings-generator-for-rust-vug2
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Tags:** haskell, rust, bindings, codegen, type-safe

## Source

Web · suis_siva: Hsrs – Type-Safe Haskell Bindings Generator for Rust

- **Original:** https://news.ycombinator.com/item?id=48189044

> Hey everyone! I've been working on hsrs, a type-safe Haskell Bindings Generator for Rust. I couldn't really find any bindings generator that would create type-safe, rich bindings for Haskell from Rust. Naturally, both languages have rich type systems, so I was amazed that no awesome bindings generator already existed, hence 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's unique about hsrs as opposed to hs-bindgen is that it has type-safe bindings for rich types, like Result, Maybe, etc. while also generating Haskell bindings. The repo contains a minimal example, and more details are available in the haskell discourse: https://discourse.haskell.org/t/ann-hsrs-ergonomic-haskell-b... https://github.com/harmont-dev/hsrs

## GitHub projects

- https://github.com/harmont-dev/hsrs

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
