Dear MirageOS developers,

more discussion on the issue tracker lead me to a revised approach. I prepared a showcase for the changes to mirage itself at https://github.com/mirage/mirage/pull/1579 and would be happy to get some feedback. (Earlier discussions in https://github.com/mirage/mirage/issues/1513 and https://github.com/mirage/mirage/pull/1521 and https://github.com/mirage/mirage/pull/1529 in case you're interested.)

The observation is: we only want a single (posix) clock, timer, (monotonic wall-clock) time, and random number generator in a unikernel.

Now, we can solve this with dune-variants \o/ -- that's the good news.

This also means we don't need to functorize every "device" with these resources, but we can just plug the right thing in when "Mirage.register" is called (you can develop your own clock, and push it into your unikernel - it only needs to stick to the existing interface).

The consumer libraries (e.g. dns) can just depend on "mirage-clock" and use the available interface -- without knowing the implementation.

So, a good start to read the changes is https://github.com/mirage/mirage/pull/1579/files#diff-79c838533b44a0761156ff031b0018fcc5f0e3837463a67484468a19c073756e

If nobody stops me, I'll push forward and soon [tm] have a set of packages to use with this PR and updates to mirage-skeleton (so you can have a deeper look).

Thanks for reading and your valuable feedback (either here, or via personal communication or on the issue tracker).


Have a nice evening,

Hannes

Reply via email to