This repository has been archived by the owner. It is now read-only.
OCaml, Meet Web.
OCaml Makefile
Switch branches/tags
Nothing to show
Clone or download
Phil Eaton
Phil Eaton Update
Latest commit deb9794 Oct 8, 2015



If you are considering writing OCaml web applications, reconsider! In OCaml, there are performant web frameworks with terrible interfaces and there are also terrible web frameworks with pretty interfaces (this one). At the time of writing, I have not found an OCaml web framework that has both!


Build Status

OWebl is a simple web framework for OCaml. While other frameworks do exist for writing web applications in OCaml (ocsigen, js_of_caml), these are massive and difficult to maneuver.

Look at how easy it is to use:

open Response
open Rule
open Server

let handler =
        (StaticRouteRule.create "/" [Verb.GET])
        (SimpleResponse.create "Hello World!")

let server = SimpleServer.serve [handler]

To build the example server:

$ ocamlbuild -libs unix,str -Is src examples/simple_server/main.native
$ ./main.native

Alternatively, to install system-wide:

$ make && make install


See the example directories!

These are also included in the makefile and can be easily built and run:

  • make fileserver && ./main.native
  • make templateserver && ./main.native


  • Simple interface
  • Multiple concurrent requests via forking
  • String and function templating support


Install OWebl by running:

$ git clone

To build, simply include Unix and Str modules and reference the path to owebl/src in your ocamlbuild line:

$ ocamlbuild -libs unix,str -Is path/to/owebl/src my_server.native

Or edit included makefile entry for simpleserver to your needs.



If you are having issues, please let us know. Please use the mailing list for any questions that may help the general audience.


The project is licensed under the BSD license.