hsrs is a developer tool that makes it easy to call Rust code from Haskell (and vice versa). You annotate your Rust types and functions with simple markers, run a code generator, and get automatically-generated Haskell bindings that handle memory management, type conversions, and data serialization for you. It supports common types like numbers, strings, lists, and custom structs, converting them appropriately between languages.
How It Works
Maybe you found a great Rust library but your main project is in Haskell, or you need Haskell's features in your Rust application.
The tool promises to automatically connect your Rust code to Haskell, handling all the tricky parts like memory and data conversion.
You sprinkle a few special annotations on your Rust types and functions—like little sticky notes that tell the system what to share.
A single command reads your annotated Rust code and magically produces matching Haskell code that understands your types.
Just import the generated module and call your Rust functions like any normal Haskell functions.
Memory management, type conversions, and error handling happen automatically behind the scenes.
Your Rust functions appear as natural Haskell code. Strings, lists, and even complex types flow smoothly between languages.
You successfully combined the best of both worlds—Rust's performance and Haskell's expressiveness—without wrestling with the technical details.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.