inline-rust
inline-rust copied to clipboard
Top-level reference types
References at the top level should be possible. For example:
main = do
let s: S = {- some complex deeply nested struct (but not enum!) -}
[rustIO| () { println!("{:#?}", (&s: &S)) } |]
Under the hood, this should turn into a Ptr S which gets unsafely turned into a reference on the Rust side.
Types that we will want to have in this category:ByteString, ByteArray, ByteArray#, MutableByteArray, MutableByteArray#, StorableVector.