[ANN] hsrs -- Ergonomic Haskell Bindings for Rust
Haskell Community [Unofficial]
May 19, 2026
Thank you for the reply and warm words!
It’s a little bit of debt and a hack, mostly done to unblock myself, coupled with a little bit of laziness and AI slop. I kind of want to completely rewrite the Sized codepaths, which would include better enum types.
In the v0.1 implementation of hsrs, I’ve decided to take the naive approach and use borsh exclusively for compound types, in which case we allocate objects on the heap. I realized that at some point I wanted a completely different code path for Sized types, (since we can completely avoid heap allocations), and decided to accept the C FFI types as they were.
There are two core things I want to land in 0.2 – avoiding heap allocation for Sized types, and, by extension, richer trivial types (including enum types).
Discussion in the ATmosphere