3 comments

  • yccs27 an hour ago ago

    It's great that this allows passing Rust structs both as ForeignPtr and as native records with marshalling!

    Some questions/ideas:

    - Is there a way to generate #[hsrs::data_type] bindings for Rust library types, or do you need to create custom wrapper types for them?

    - It seems like all #[hsrs::function]s are translated to return IO (since Rust functions can do arbitrary side effects). It would be great if you could (unsafely) mark functions as pure, to get pure Haskell functions without having to wrap them in unsafePerformIO.

    - Both Haskell and Rust have HM type systems, so I wonder if you could also translate type classes from Rust to Haskell.

  • _flux 4 hours ago ago

    It would be so nice if these "well typed languages" would be able to interact better with each other. Alas, the GC will probably cause some friction, e.g. the ocaml-rs package makes this pretty visible: https://github.com/zshipko/ocaml-rs/blob/master/examples/rus... . (I have not used either of these projects.)

    Maybe the GC would be less of a problem if we didn't want to have the best possible performance as well.

  • rienbdj 5 hours ago ago

    Really cool nice job!

    With more and more ecosystem libraries being written in Rust (and a Python wrapper) could this be a way to expand the Haskell ecosystem?