B0caml 3eeea5b

b0caml runs OCaml scripts like ocaml. However it provides direct support for using third-party modules and compiles scripts transparently to a cache of native (or bytecode) executables.

Consult the manual and its tutorial introduction.

Quick start

A few invocations to get you started.

cat > echo <<EOCAML
#!/usr/bin/env b0caml

let echo oc ss = output_string oc (String.concat " " ss ^ "\n")
let () = echo stdout (List.tl (Array.to_list Sys.argv))
EOCAML
> chmod +x ./echo
> ./echo grunt
grunt
> b0caml ./echo grunt  # for Windows compatible invocations
grunt

Read how to use third-party modules and more in the tutorial introduction.

API

This is an unstable API subject to change even between minor versions of the tool. Use at your own risk.