Nicheloom visits: 58,069 all-time · 7,637 in the last 7 days

The opportunity tracker for new startups.

Today: 1,953 launches · Niche of the day: specialized calculation tools · See what launched today →

Hsrs

Type-Safe Haskell Bindings Generator for Rust

Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.

Want to reach these readers? Sponsor an issue.

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...

HN · launched May 19, 2026 · 53 upvotes (top 16%) · 0 views

Niche: api generation and management tools · 64 launches, 1 in the last 7 days ▼ -80% · Explore this niche →

Category and tags

  • Horizontal
  • Dev tools
  • Developer
  • Not AI
  • Hobby / open-source project

Visit website ↗ Source listing ↗

Could you build this?

No Building a cross-language FFI binding generator between Rust and Haskell requires deep compiler engineering and mastery of both languages' type systems, memory layouts, and ABIs.

What it would actually take: The tool must parse Rust ASTs (via syn), inspect C ABI representations, map complex algebraic data types to Haskell FFI conventions, and generate matching Haskell/C code with correct memory management (handles, pointers, finalizers). The hard parts include handling non-trivial generic lifetimes, safe concurrency, and exception boundaries between Haskell's GHC runtime and Rust. This requires deep compiler and language runtime expertise.

Discussion

9 comments analyzed.

Competitors mentioned: napi-rs, pyo3, ocaml-rs, JSC internal bindings

Concerns raised: Panics across FFI boundary cause runtime crash (UB behavior), GC friction between languages makes performance optimization difficult, Monomorphization makes translating generic Rust functions unclear, Type system guarantees don't transfer across language boundaries

Feature requests: Generate bindings for existing Rust library types without custom wrappers, Mark functions as pure to avoid IO wrapper overhead, Translate Rust traits/type classes to Haskell, Automated purity detection (const fn, creusot support)

Competitors

Other products that read as similar to this one : 263 launches clear the similarity bar, closest 8 shown.

Attention rank: #58 of 264 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).

Launched 199 days after the earliest competitor.

The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.