Stream: ideas

Topic: basic-webserver on mirageOS?


view this post on Zulip Richard Feldman (Nov 24 2023 at 15:02):

I just saw mirageOS and I wonder if it would be possible to get a basic-webserver app running on it. Seems like they require using OCaml, but I wonder if it's possible using OCaml CFFI - I dunno!

view this post on Zulip Agus Zubiaga (Nov 24 2023 at 16:49):

It would probably have to be its own platform, right? It looks like interface to the OS is through OCaml libs, so rust wouldn’t be able to do syscalls

view this post on Zulip Agus Zubiaga (Nov 24 2023 at 16:51):

I mean, the apps and platforms model shines for things like this!

view this post on Zulip Brendan Hansknecht (Nov 24 2023 at 16:57):

Yeah, ocaml platform. The question is if mirageos support ocaml using cffi and loading arbitrary code. If so, roc can be used by ocaml through cffi.

view this post on Zulip Agus Zubiaga (Nov 24 2023 at 17:00):

https://mirage.io/blog/modular-foreign-function-bindings

view this post on Zulip Richard Feldman (Nov 24 2023 at 17:02):

A MirageOS application works by abstracting the logic of the application from the details of platform that it is compiled for.

sounds familiar! :smiley:

view this post on Zulip Agus Zubiaga (Nov 24 2023 at 17:03):

Yeah, my thought was “This would probably be easier to build with Roc” :big_smile:

view this post on Zulip Agus Zubiaga (Nov 24 2023 at 17:03):

RocOS when

view this post on Zulip Brendan Hansknecht (Nov 24 2023 at 17:03):

Yeah, has proper ffi. So could make it a roc platform. Probably have to let it consume roc as an object file or shared library and deal with final linking. Don't think our linking can make an os kernel

view this post on Zulip Agus Zubiaga (Nov 24 2023 at 17:04):

…yet

view this post on Zulip Brendan Hansknecht (Nov 24 2023 at 17:04):

That said, building on a rust or c or zig microkernel may suit roc better and build a faster overall platform. I swear I have seen something just like this for rust that makes a webserver microkernel


Last updated: Jun 16 2026 at 16:19 UTC