inline-rust
inline-rust copied to clipboard
Consider matching box types to ForeignPtr
Consider
newtype Box t = Box { unBox :: ForeignPtr t }
It might be interesting to match Box<T> types to Box t. The useful part would be being able to associated a Haskell finalizer with Boxs we get back from Rust (the finalize would just look like [rust| () { $(x: Box<..>).drop() } |]).
The Box type here is what I want if -XLinearTypes goes through.