This commit is contained in:
Hannes Mehnert 2024-05-15 16:44:14 +02:00
parent b6388e5bfd
commit 6aad459e8f

View file

@ -35,6 +35,8 @@ At the retreat we discussed and thought about replacing the functors in MirageOS
I got into coding a bit, and first looked into conditional compilation with the [`select`](https://dune.readthedocs.io/en/stable/reference/library-dependencies.html#alternative-dependencies) clauses from dune. They turned out to be not very flexible (you've to decide in the package what are all the options, and which one to take). I switched to [dune variants](https://dune.readthedocs.io/en/stable/variants.html#dune-variants), where the idea is that you provide a virtual interface, and only when compiling the executable you specify the implementation. This is great, since the mirage tool (at mirage configure time) can emit the dependencies. I went ahead and defunctorised the whole network stack - it was nice to see it is possible, but this is not easily upstreamable. There's as well at least [one issue](https://github.com/ocaml/dune/issues/10460) in the dune variant code, I'm sure it will get debugged and fixed once we decide that dune variants are the solution we want to try out. I got into coding a bit, and first looked into conditional compilation with the [`select`](https://dune.readthedocs.io/en/stable/reference/library-dependencies.html#alternative-dependencies) clauses from dune. They turned out to be not very flexible (you've to decide in the package what are all the options, and which one to take). I switched to [dune variants](https://dune.readthedocs.io/en/stable/variants.html#dune-variants), where the idea is that you provide a virtual interface, and only when compiling the executable you specify the implementation. This is great, since the mirage tool (at mirage configure time) can emit the dependencies. I went ahead and defunctorised the whole network stack - it was nice to see it is possible, but this is not easily upstreamable. There's as well at least [one issue](https://github.com/ocaml/dune/issues/10460) in the dune variant code, I'm sure it will get debugged and fixed once we decide that dune variants are the solution we want to try out.
The current result is a [mail to the development list](https://lists.xenproject.org/archives/html/mirageos-devel/2024-05/msg00002.html), and a [defunctorising time PR](https://github.com/mirage/mirage/pull/1529), as well as a [bootvar PR](https://github.com/mirage/mirage/pull/1533) (relying on other PRs).
## Conclusion ## Conclusion
I found the retreat very inspiring, there were lots of interest in various topics, and a lot of projects have been worked on. I'm also very happy that I managed to contribute and start some projects that will hopefully ease MirageOS adaption -- both on the deployment side, but as well on the developer experience side. I found the retreat very inspiring, there were lots of interest in various topics, and a lot of projects have been worked on. I'm also very happy that I managed to contribute and start some projects that will hopefully ease MirageOS adaption -- both on the deployment side, but as well on the developer experience side.