# Community help/advices need for ocaml-lua

**URL:** <https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247>\
**Category:** Ecosystem\
**Tags:** dune, odoc, lua\
**Created:** [August 14, 2019, 3:59pm UTC](https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247 "2019-08-14T15:59:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdonadeo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/pdonadeo/32/6309_2.png) [@pdonadeo](https://discuss.ocaml.org/u/pdonadeo)\
**Post date:** [August 14, 2019, 3:59pm UTC](https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247/1 "2019-08-14T15:59:31Z")

</div>

Hi all, I’m the author of [ocaml-lua](https://github.com/pdonadeo/ocaml-lua), a complete binding to the [Lua library](https://www.lua.org), version 5.1.x.

I was recently asked to port the library to OCaml 4.08 and of course I want to make it available to the new compilers but I need some help. Here are the ideas/problems I’m facing and about which I’d like to hear your opinions:

1. I decided to remove the dependency of the package on any external Lua library provided by the hosting OS: Lua 5.1.x is freezed and there no point in depending on an external library so I added the sources into ocaml-lua repository. This should greatly simplify the compiling/linking process. What do you think?

2. I’m porting the build from OASIS to dune: no problem here but in the present version of ocaml-lua (1.7) installs a library named “lua”. So you `opam install ocaml-lua` and then, in the toplevel, you `#require "lua"` which is _very unusual_.  
In the dune version: the package remains `ocaml-lua` but the library itself has the same name. This will **certainly** break the build process of programs using the library. It’s not an API change but… I don’t know if this is acceptable.

3. In the coming 1.8 version I want to support OCaml \>= 4.08: this way the old versions (\<= 1.7) will continue to be installable for old compilers. Again in my opinion this is not a limitation because the library is the same but I’m open to critics.

4. A question about OPAM CI: is there a way to locally test the CI process? I usually submit a new version of the package and for one reason or another some test fails. This is a loss of time for the OPAM guys and I want to keep their effort ideally near zero. I’m particularly interested in how to test the build process for OSX and Windows (because [I was requested to support Windows](https://github.com/pdonadeo/ocaml-lua/issues/15)) and being a Linux programmer I have no idea on how the OCaml ecosystem works in OSX (ok, via brew I suppose, but still… I don’t hava a Mac) and… Windows. Someone out there using OCaml/OPAM in a Windows environment? And how to start a complete CI cycle locally?

5. I’m grudgingly going to drop support for LuaJIT: the reason is to keep the library as simple as possible to be compiled everywhere. Anyone using ocaml-lua **and** LuaJIT?

---

<div class="post-metadata">

**Author:** ![jeremiedimino](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jeremiedimino/32/699_2.png) [@jeremiedimino](https://discuss.ocaml.org/u/jeremiedimino)\
**Post date:** [August 19, 2019, 9:35am UTC](https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247/2 "2019-08-19T09:35:11Z")

</div>

Regarding 2, one option if you want to minimise breakages is to rename the package just `lua` and then have `ocaml-lua` be a proxy for `lua`.

I would expect `ocaml-lua` to be used only as a direct dependency of end point programs rather than be a dependency of intermediate libraries. `ocaml-lua` has no reverse dependencies in opam for instance. In this case, renaming the library is probably Ok, especially as it is a simple change for users of `ocaml-lua`.

---

<div class="post-metadata">

**Author:** ![pdonadeo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/pdonadeo/32/6309_2.png) [@pdonadeo](https://discuss.ocaml.org/u/pdonadeo)\
**Post date:** [August 21, 2019, 7:10am UTC](https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247/3 "2019-08-21T07:10:09Z")

</div>

Thanks @jeremiedimino, I’m probably going to rename the opam package, it seems more linear than a proxy for such a simple library. This is not a jbuilder -\> dune scenario.

Regarding 4) I’m still groping in the dark… After days of Google and a **lot** of reading I have no clue about how to achieve the task.

---

<div class="post-metadata">

**Author:** ![XVilka](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/xvilka/32/5334_2.png) [@XVilka](https://discuss.ocaml.org/u/XVilka)\
**Post date:** [August 21, 2019, 7:14am UTC](https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247/4 "2019-08-21T07:14:42Z")

</div>

See [https://github.com/ocaml/ocaml-ci-scripts](https://github.com/ocaml/ocaml-ci-scripts) and [https://github.com/coq/coq/blob/master/azure-pipelines.yml](https://github.com/coq/coq/blob/master/azure-pipelines.yml) as an examples for working with Windows and OS X CI/opam.

---

<div class="post-metadata">

**Author:** ![jeremiedimino](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jeremiedimino/32/699_2.png) [@jeremiedimino](https://discuss.ocaml.org/u/jeremiedimino)\
**Post date:** [August 21, 2019, 7:56am UTC](https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247/5 "2019-08-21T07:56:29Z")

</div>

In the past I’ve used [autoci](https://github.com/yomimono/autoci) to generate the travis/appveyor configuration and it worked well.

---

<div class="post-metadata">

**Author:** ![pdonadeo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/pdonadeo/32/6309_2.png) [@pdonadeo](https://discuss.ocaml.org/u/pdonadeo)\
**Post date:** [August 21, 2019, 8:57pm UTC](https://discuss.ocaml.org/t/community-help-advices-need-for-ocaml-lua/4247/6 "2019-08-21T20:57:21Z")

</div>

@XVilka @jeremiedimino thanks!
