-
Notifications
You must be signed in to change notification settings - Fork 23
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
Switch to caller-rooted arguments calling convention for imported OCaml functions #17
Conversation
3832ad7
to
5707460
Compare
11c5523
to
2ac36e8
Compare
…Result. panic! on unexpected exceptions.
c6473fd
to
075d331
Compare
FWIW, you don't have to pass self by reference or change as_* to to_* for OCaml types that are basically one usize, Clippy gave that advice due to a recently introduced bug: rust-lang/rust-clippy#6316 (comment) |
Thanks, that is good to know, I'm pretty sure I saw that warning at some point. The |
e795c4c
to
de5e6d6
Compare
…thout converting inner values
3e151bf
to
d3df4b8
Compare
Changes
Changes to simplify Rust->OCaml calls through the use of a caller-save calling convention, and handling unexpected exceptions with a
panic!
.ocaml!
produce functions that expect rooted arguments.ocaml!
functions return results directly, instead of wrapped inResult
.panic!
on unexpected exceptions.Implement a way to catch OCaml raised exceptions.(Nothing will be done here for now, users will have to resort tostd::panic::catch_unwind
).ocaml_call!
andocaml_alloc!
macros.