Sysrepo Lua 5.2 bindings

When Sysrepo is to be compiled with language bindings for Lua 5.2 make sure relevant Lua packages are present on the build machine. In Ubuntu world that would be lua5.2 and lua5.2-dev packages. The sysrepo docker container comes with preinstalled Lua 5.2 on Ubuntu 14.04. You can find out about that in the Dockerfile

To compile the Lua 5.2 bindings use the cmake flag GEN_LUA_BINDINGS and GEN_LUA_VERSION.

From the docker container sysrepo/sysrepo-netopeer2:lua you can build Lua 5.2 bindings with the commands.

cd /opt/dev/sysrepo
mkdir build_lua52
cd build_lua52
cmake -DGEN_LUA_VERSION=5.2 ..
make -j2
make install

The code example used can be found here.

Now you can run the Lua 5.2 examples with:

sysrepod -l 0
lua5.2 swig/lua/examples/

You can watch the process in the asciinema video:

bindings/lua5.2 (last edited 2016-11-22 19:23:22 by mnovakovic)