Building Mirage unikernels with Dune?

I noticed the commands I’m using as per documentation invoke ocamlbuild and generate various .ml files. Is there a way, even experimentally, to build Mirage applications purely with Dune?

1 Like

I think the answer is “soon”: https://github.com/mirage/mirage/issues/969

1 Like

Ok will do for now :slight_smile:

I’m building a unikernel with a handwritten dune file, but I have to remove it from the tree whenever I reconfigure it with mirage config.

Nice project :smiley:

So you wrote your dune, “hide” it to run mirage configure .. and then delete the generate files and run dune build?

You don’t have to delete the generated files, but yes basically. The annoying part is guessing the libraries to use in the (libraries ...) after you reconfigure it.

Great thanks, will try that.

What do you do about the autogenerated .opam file? In my case it generates one despite having my own and then this confuses dune.

I don’t think I have one. I guess you can just delete the generated one