Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move unix dependency on opium to another package #259

Open
dinosaure opened this issue Feb 9, 2021 · 1 comment
Open

Move unix dependency on opium to another package #259

dinosaure opened this issue Feb 9, 2021 · 1 comment

Comments

@dinosaure
Copy link

In the way to facilitate building an unikernel with Opium, it could be interesting to split a bit the package with two versions:

  • one with the unix dependency (like opium-unix)
  • the other with no dependencies with the host system

Some parts of Opium relies only on the caml runtime (such as route.ml) but they are unusable with MirageOS due to the dependency to unix (transitively with httpaf-lwt-unix). As far as I can see, opium as a framework requires unix only for two things:

  • the way to initiate a simple HTTP server (so we can easily move this part to a new package)
  • Body.of_file which can be special middleware available only with opium-unix

Currently, I experimented only rock with MirageOS but the API is really poor and, even if it facilitates some details (about request/response), it's not enough to make a real application.

@tmattio
Copy link
Collaborator

tmattio commented Feb 20, 2021

Hi @dinosaure!

That's something we've talked about and although we're all very enthusiastic about building Opium unikernels, we agreed on waiting for some initial support for Mirage before factoring out the Unix parts of Opium.

In practice, that probably means having an opium-mirage library that provides the Mirage equivalent of the Unix-dependent bits. I've been meaning to start this work for some time now but lacked the time, so if you're experimenting on this and would like to get the ball rolling, a PR will be very much welcome 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants