rgrinberg / opium

Sinatra like web toolkit for OCaml
MIT License
755 stars 67 forks source link

Mirage compatibility? #58

Closed sgrove closed 4 years ago

sgrove commented 8 years ago

I haven't tried to use Opium with my Mirage site for some time now, but I'm curious if it would work? I'd like to drop my current janky routing.

chrismamo1 commented 7 years ago

As far as I know Opium uses Cohttp, which was made by the MirageOS team. The unix dependencies, however, may be problematic.

anuragsoni commented 4 years ago

Opium_kernel is usable under mirage. You'd need to setup some plumbing to configure the application to replicate what's done via the Opium.App module, but the kernel should work on mirage. Let me know if you are still interested in this and i can help if needed.

Note that the current master branch is now based on httpaf and you can see an example of running that under mirage at https://github.com/anuragsoni/ocaml-opium-unikernel

Its using https://github.com/dinosaure/paf-le-chien for the httpaf implementation