
LabLua in Google Summer of Code 2021
We were very happy to participate again in Google Summer of Code (GSoC)! This is the eight time we had the opportunity to collaborate with students from all around the world on interesting projects. These are the highlights from the 2021 edition.
- Closures in Pallene
- Lua scripted watchpoints in LLDB
- Typed API for LuaRocks
- A Lua library for Freechains-P2P
Closures in Pallene

Pallene is a typed companion language to Lua. It's syntax is similar to Lua, but with type annotations which allow it to be compiled into much more efficient code. In this project, we added nested functions and closures to the Pallene. This powerful feature will allow programmers to create many kinds of programs in Pallene which were not possible before. The journey we went through to solve this challenge is documented in Srijan's blog: Part 1, Part 2.
The Code
The code written for this GSOC has already been merged into the main Pallene repository on Github. A list of the merged pull-requests can be found here.The Student
Srijan Paul is a CS undergrad. He likes functional programming, PL theory, distributed systems and game development.Mentors
Hugo GualandiLua scripted watchpoints in LLDB

LLDB is a powerful debugger under LLVM project. LLDB breakpoints and watchpoints are scriptable with Python callbacks when they get hit. Breakpoints can also accept Lua callbacks while watchpoints did not support Lua callbacks before the project.
The project adds support for Lua scripted watchpoints, making watchpoints accept Lua callbacks as well. The project also improved the the documentation of scripting parts in LLDB. We also extended the liblldb to make it available as a Lua module, so that all features of LLDB are visible to the standalone Lua interpreter. This enables Lua users to create customized debugging utilities with the power of LLDB.
To be specific, we have added necessary glue functions that connect LLDB with the embedded Lua interpreter, so that it may support Lua scripted watchpoints. We also translated Python code to Lua in LLDB scripting documentation, and used a new Sphinx plugin sphinx_tabs to make code blocks switchable between Python and Lua. For the extension part of the project, we supplemented SWIG typemaps for Lua and wrote a test suite for Lua LLDB module to make liblldb visible to Lua.
The Code
The results of this GSOC are summarized in this page. It includes a link to code repository, as well as a list of the pull requests implemented by the student.The Student
Shichu YangMentors
Pedro Tammela, Jonas DevilieghereTyped API for LuaRocks
