-
Notifications
You must be signed in to change notification settings - Fork 145
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
Does auto-derived Getable only work on records and not Rust-originating structs? #591
Comments
t184256
changed the title
Does auto-derived Getable only work on records and not instances of itself
Does auto-derived Getable only work on records and not Rust-originating structs?
Jul 24, 2018
Marwes
added a commit
to Marwes/gluon
that referenced
this issue
Jul 24, 2018
Marwes
added a commit
to Marwes/gluon
that referenced
this issue
Jul 24, 2018
Thanks for reporting, seems like you ran into a bug with the Pushable derive, fix in #593 |
Marwes
added a commit
to Marwes/gluon
that referenced
this issue
Jul 24, 2018
Great, specifying
really fixed the problem I was having. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry if this is trivial, but I can't get a derived Getable to return from gluon to Rust. First experience with Rust and gluon, yadda yadda.
To get something that is sure to work and to be on the same page with @Marwes and @Laegluin, I have adapted the marshalling example to this: https://gist.github.com/t184256/3d969d4bf862d124ed1948dea9042466
I added
and tried to return the result of
make_struct "Hello"
to Rust. It fails withat
<gluon_test::Struct as gluon_vm::api::Getable<'__vm>>::from_value
and I have no idea how to make the struct return to Rust land.
Meanwhile, returning a record with the required fields present is totally fine.
So, does auto-derived Getable::from_value only work on records and not proper Rust-originating instances of the structs in question? How can I return a struct that I already shoved into Gluon succesfully, unmodified? Could you guys write trivial examples as well and not dive into overcomplicated ones right away?
The text was updated successfully, but these errors were encountered: