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

Separate out caml_startup-dependent code into `runtime` library

Open mrmr1993 opened this issue 3 years ago • 2 comments

This PR moves the utility functions for starting an OCaml runtime into their own library.

This is a trivial but breaking change. I've taken the liberty of bumping the version number accordingly.

This fixes #34.

Tested by:

  • running dune utop in an OCaml project using this library to generate a rust native library (via a tweaked ocaml-rs)
  • running make test-all

mrmr1993 avatar Aug 06 '21 01:08 mrmr1993

@mrmr1993 at a first glance it looks good, but will re-check tomorrow. One thing, you have to bump the version of the root Cargo.toml file too.

About the commented function in the doctest, is it not possible to make that one work?

tizoc avatar Aug 06 '21 01:08 tizoc

One thing, you have to bump the version of the root Cargo.toml file too.

Done, good catch!

About the commented function in the doctest, is it not possible to make that one work?

It's the first time I've come across tests in this format, so I'm afraid I'm not sure. I strongly suspect not -- there doesn't seem to be any way to specify additional external deps for those tests -- but that doesn't mean there isn't one.

mrmr1993 avatar Aug 06 '21 02:08 mrmr1993