Our great sponsors
-
ocaml-opium-unikernel
Example unikernel using opium + httpaf (using https://github.com/dinosaure/paf-le-chien)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Lwt [1] based web frameworks can be used on MirageOS if they provide an interface that allows someone to swap out the unix dependent pieces. One such framework is Opium [2], that provides most of its features in a unix independent code library `opium_kernel`. Its fairly straightforward to run an opium app on mirage. This example needs to be updated to the newest apis in the released version of Opium but this can provide some hints about how to run an opium app on mirage: https://github.com/anuragsoni/ocaml-opium-unikernel.
If a lower level web toolkit is sufficient then ocaml's cohttp [3] library has been available on mirage for quite some time now.
[1] https://github.com/ocsigen/lwt/
[2] https://github.com/rgrinberg/opium
[3] https://github.com/mirage/ocaml-cohttp/
No, it was not Jitsu. Jitsu is based on MiragOS/OCaml, Erlang-on-Xen was also a Xen-based unikernel like MirageOS but was (as you can guess) Erlang specific. I think you can now find it at https://github.com/cloudozer/ling .
Thanks for chiming in!
Sadly cohttp is (or was) performing so bad that it is kind of at odds with using it on a unikernel.
This one is quite a bit faster:
https://github.com/inhabitedtype/httpaf
The `opium_kernel` example I linked to above is running on top of https://github.com/dinosaure/paf-le-chien which is a mirage layer for httpaf.