inline-rust icon indicating copy to clipboard operation
inline-rust copied to clipboard

Support more types

Open harpocrates opened this issue 7 years ago • 3 comments

I think we will want:

Haskell Rust argument Status
StorableArray Int a &mut [a'] see https://github.com/harpocrates/inline-rust/issues/12
Vector a Vec<a'>
StablePtr a *const a'
() () Done
(a,b) (a',b') Done
(a,b,c) (a',b',c') Done
Storable data corresponding #[repr(C)] struct Done
ByteString &[u8] see https://github.com/harpocrates/inline-rust/issues/12
Maybe a Option<a'> Done
Either e a Result<a',e'> Done

I'm still undecided on what to do around strings. I also feel like we could make good use of box somewhere here...

harpocrates avatar Nov 29 '17 15:11 harpocrates

This will be really cool when it works. Will using tree/graph-like types be feasible? (I think that's ADTs?)

ghost avatar Jan 08 '18 19:01 ghost

@22459 Yeah, I'd like to eventually have Haskell ADTs mapping to Rust enums. Right now, I only support passing things that have the same memory-representation, so I'd have to add support for some extra processing on both the Haskell and Rust side.

Really, I just need to find more time to work on this.

harpocrates avatar Jan 08 '18 20:01 harpocrates

Right. Good luck!

ghost avatar Jan 08 '18 21:01 ghost