Differences between revisions 11 and 12
Revision 11 as of 2016-11-22 19:22:53
Size: 1229
Editor: mnovakovic
Comment:
Revision 12 as of 2016-11-22 19:23:22
Size: 1216
Editor: mnovakovic
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
From the docker container sysrepo/sysrepo-netopeer2:devel_20161027 you can build Lua 5.2 bindings with the commands. From the docker container sysrepo/sysrepo-netopeer2:lua you can build Lua 5.2 bindings with the commands.
Line 25: Line 25:
lua5.2 swig/lua52/examples/lua_application_example.py lua5.2 swig/lua/examples/lua_application_example.py

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
netopeer2-server
lua5.2 swig/lua/examples/lua_application_example.py

You can watch the process in the asciinema video:

https://asciinema.org/a/89234

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