Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top-level reference types #12

Open
harpocrates opened this issue Mar 18, 2018 · 1 comment
Open

Top-level reference types #12

harpocrates opened this issue Mar 18, 2018 · 1 comment

Comments

@harpocrates
Copy link
Owner

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.

@harpocrates
Copy link
Owner Author

Types that we will want to have in this category:ByteString, ByteArray, ByteArray#, MutableByteArray, MutableByteArray#, StorableVector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant