Open zshipko opened 3 years ago
This is primarily an issue when compiling native libraries: you can't depend on caml_startup
and friends being available if the library will later be linked against an OCaml program (or loaded dynamically, e.g. by dune utop
) but is compiled separately first.
In the short term, I'm planning to remove the offending code in a local fork. Longer term, it would be great to see the runtime code as a separate library, and allow arbitrary code to 'claim' access to the OCaml runtime so that e.g. ocaml-rs can use the runtime when its functions are called from an existing runtime as well.
I'm happy to contribute to this effort, if useful.
@mrmr1993 yes please! The only reason this has not been fixed is that no one has had time to do it, but a solution would be very welcome.
@tizoc done, see PR #36.
Here is the linker error when running
dune utop
in ocaml-rust-starter:For more information: see the original issue