Hey,

happy new year to you all!


On 16/12/2024 16:31, Nick Betteridge wrote:
Thanks for your detailed reply - very useful and a great overview of how you and Robur handle the compilation chain.

Thanks for the correct ocamlnat link - I should have asked at the time!

I also naively overlooked the issue of the C compiler/linker being available in a mirage unikernel.

I recently looked into the "embeddding the OCaml native toplevel into a unikernel", and there are several issues with it: - it requires an assembler (since OCaml only generates assembly files) - not sure if there's a native OCaml implementation,
- it also requires a linker to convert the assembly into a shared library,
- and finally it loads the shared library using dlopen (etc.) - which is not available in a MirageOS unikernel setting.

So, for the moment I gave up on that front - it requires a better expert in the OCaml runtime system whether there could be an easier path for evaluating OCaml expressions within a constrained environment -- maybe shipping the bytecode toplevel in a MirageOS unikernel and having a path to access the native values? But here I don't understand how the native and bytecode runtime differ, and if there's any chance to have interoperability on that level?


Maybe one day I'll find an OCaml compiler/runtime expert to look into that deeper :) Maybe here on the mailing list ;)


Hannes


Reply via email to