ocaml-interop icon indicating copy to clipboard operation
ocaml-interop copied to clipboard

OCaml<->Rust FFI with an emphasis on safety.

Results 16 ocaml-interop issues
Sort by recently updated
recently updated
newest added

Related to #34 and the idea @mrmr1993 had (with proof-of-concept in #36). Will require some synchronization with @zshipko to keep things compatible with ocaml-rs. From the point of view of...

Here is the linker error when running `dune utop` in [ocaml-rust-starter](https://github.com/zshipko/ocaml-rust-starter): ``` /usr/bin/ld: src/libocaml_rust_starter.a(ocaml_interop-4a398e80f3ca6ceb.ocaml_interop.8eq22uyz-cgu.12.rcgu.o): in function `_ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h7171c1b9a6fc7898E.llvm.3140953836603515050': ocaml_interop.8eq22uyz-cgu.12:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h7171c1b9a6fc7898E.llvm.3140953836603515050+0x3b): undefined reference to `caml_startup' /usr/bin/ld: src/libocaml_rust_starter.a(ocaml_interop-4a398e80f3ca6ceb.ocaml_interop.8eq22uyz-cgu.12.rcgu.o): in function `_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h59471d095cabe6c5E.llvm.3140953836603515050': ocaml_interop.8eq22uyz-cgu.12:(.text._ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h59471d095cabe6c5E.llvm.3140953836603515050+0x3b): undefined reference...

Currently there's implicit trust in the fact that `OCaml` values are created with the right type. `OCaml::new` is marked unsafe as it should, but there are plenty of "safe" wrappers...

**WIP** ## Motivation [ocaml-rs](https://github.com/zshipko/ocaml-rs) already solves a bunch of things that are planned in `ocaml-interop`, and `ocaml-interop` already provides a safe API that could benefit `ocaml-rs`. The idea her is...

enhancement

The version of boxroot required is not compatible with the removal of the `caml/compact.h` header file in OCaml 5.2. https://github.com/tizoc/ocaml-interop/blob/2ba50efe5c967f8c11611c63a8caccbe89de96e4/Cargo.toml#L20