mirage / mirage-solo5

Solo5 core platform libraries for MirageOS
ISC License
20 stars 21 forks source link

update with the new ocaml-solo5 interface #91

Closed palainp closed 2 years ago

palainp commented 2 years ago

As discussed previously with @dinosaure, with version v0.8.1 of ocaml-solo5, we can now have stats on the heap allocs & frees. This PR is identical to the PR on mirage-xen as we use solo5 in both cases. As @hannesm pointed out, I'm not sure how to add a constraint on a specific ocaml-solo5 version ?

reynir commented 2 years ago

One solution I can think of without directly depending on solo is to use conflicts: ´´´opam conflicts: [ "solo5" {< "0.7.2} "solo5-bindings-hvt" ... "solo5-bindings-xen" ] ´´´ (why does mirage-solo5 not depend on solo5?)

dinosaure commented 2 years ago

(why does mirage-solo5 not depend on solo5?)

It's now a part of the mirage tool to describe which dependencies must be installed by opam and which dependencies must be downloaded by opam-monorepo. For the second case, all (transitive) dependencies must compile with dune, which is not the case of solo5. To be able to use mirage-solo5 as a basic package (and mainly be able to generate the documentation) and a dependencies required for an unikernel (and downloaded by opam-monorepo), we must keep this "shims".