{"by":"suis_siva","descendants":9,"id":48189044,"kids":[48190839,48191967,48190554,48219217],"score":53,"text":"Hey everyone! I&#x27;ve been working on hsrs, a type-safe Haskell Bindings Generator for Rust.<p>I couldn&#x27;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&#x27;ve used those, hsrs will feel right at home.<p>What&#x27;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: <a href=\"https:&#x2F;&#x2F;discourse.haskell.org&#x2F;t&#x2F;ann-hsrs-ergonomic-haskell-bindings-for-rust&#x2F;14129\" rel=\"nofollow\">https:&#x2F;&#x2F;discourse.haskell.org&#x2F;t&#x2F;ann-hsrs-ergonomic-haskell-b...</a>","time":1779163569,"title":"Show HN: Hsrs – Type-Safe Haskell Bindings Generator for Rust","type":"story","url":"https://github.com/harmont-dev/hsrs"}