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

OCaml 5 support #58

Open
mt-caret opened this issue Dec 11, 2023 · 3 comments
Open

OCaml 5 support #58

mt-caret opened this issue Dec 11, 2023 · 3 comments

Comments

@mt-caret
Copy link
Contributor

Hi!

In the same vein as zshipko/ocaml-rs#125 I'd love to know if there are any plans to add support for OCaml 5, and if you have some roadblocks that you anticipate. I'm guessing bumping the version of boxroot and perhaps implementing something along the lines of #42 to support the rules around the multicore runtime may be necessary, and I'd love to hear your thoughts on this (and would also be eager to work on any blockers if you're open to accepting PRs related to this)!

@tizoc
Copy link
Owner

tizoc commented Dec 11, 2023

Hi @mt-caret. There are plans for supporting OCaml 5 yes. A new release of boxroot is required that will fix a bug that is causing issues with OCaml 4.x, then some API changes are required in ocaml-interop (related to #42), which I already implemented a while ago, and just require some refining.

@patrick-nicodemus
Copy link

I tried cloning this repo and updating the boxroot dependency to 0.3.0 and I got the following compilation error:

error[E0308]: mismatched types
  --> /home/patrick/code/ocaml/rust/ocaml-interop/src/boxroot.rs:29:31
   |
29 |             boxroot: unsafe { boxroot_create(val.raw) },
   |                               ^^^^^^^^^^^^^^^^^^^^^^^ expected `BoxRoot`, found `Option<BoxRoot>`
   |
   = note: expected struct `ocaml_boxroot_sys::BoxRoot`
                found enum `Option<ocaml_boxroot_sys::BoxRoot>`
help: consider using `Option::expect` to unwrap the `Option<ocaml_boxroot_sys::BoxRoot>` value, panicking if the value is an `Option::None`
   |
29 |             boxroot: unsafe { boxroot_create(val.raw).expect("REASON") },
   |                                                      +++++++++++++++++

So there is a little work to be done to make this compatible with the newer release of boxroot.

@dannywillems
Copy link

Hey. It seems there have been updates on ocaml-boxroot, now mentioning OCaml 5 in the README: https://gitlab.com/ocaml-rust/ocaml-boxroot.
Is there anything we could help with?

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

4 participants