Skip to content

Draft: Scriptable shell with Lua

Michael Tretter requested to merge m.tretter/weston:lua-scripting into main

Add a (very messy) prototype for experimenting with Lua scripting in Weston.

I added the scripting to a controller for the IVI-shell. The IVI shell already provides an API with hooks for features that I would control from a script. Using a separate controller makes it possible to experiment with the API and the integration of the script without running into conflicts with other changes to Weston. In the long run, the controller and the IVI-shell probably should be dropped and the scripting directly hooked to a shell.

The current implementation calls into the script to asks for the size of a surface and sends the configured size to the Wayland client via the configure event. It also provides a function to print a message to the Weston log.

The integration is still very messy, as I am still not sure how to implement the marshaling between Weston and the scripting language. Currently, it's a mix of generated bindings and manually implemented marshaling since I couldn't figure out how to generate code for calling from C to Lua, yet.

Issue: #520

Merge request reports