What is ocaml-lua
OCaml-lua provides bindings to the Lua programming language. Lua is a scripting language particularly useful when you need to embed a language in your application.
This project provides the bindings required to embed Lua.More information about Lua
This library is intended to be useful to OCaml developers needing a dynamic language to be included in their projects, for configuration or customization purposes. Instead of reinventing yet another DSL, one should consider using an existing programming language and Lua is in my opinion the perfect companion of a statically typed language like OCaml.
In a few lines of code you can create a Lua interpreter and run a Lua program inside it. You can provide the Lua state with library functions written in OCaml and available to the Lua program.
More informations about Lua can be found on the documentation page.
My advice is to read the book "Programming in Lua", written by the author of the language, Roberto Ierusalimschy.
The complete library reference (ocamldoc generated) is here.
Source tarball are on the download page on OCaml Forge.
The official GIT repository is here.
Bug reports and feature requests are on my page on GitHub.
To build the library the following requirements are mandatory:
- lua 5.1.x
- ocaml (>= 3.12.1) (but OCaml 4.0.x was not tested!)
To compile use the usual spell:
check the options of the configure script with --help, and pay particular attention to --docdir which defaults to /usr/local/share/doc/ocaml-lua
- make doc
- make install