bootstrap(3)
πΈ Bootstrapping the Lua API interface β bootstrap(3) πΈ
okay bestie, you've opened the bootstrap(3) page from the User Contributed Perl Documentation, and it's literally giving "behind the scenes of the Lua API interface" energy. π
The file protos contains C prototypes for Lua routines which may throw errors via lua_error(). For those routines, the Perl interface code comes from templates, while every other Perl interface is hand crafted. β¨
no cap, Lua API routines which can throw errors have to be sandboxed so that the Perl runtime environment isn't corrupted. This is done by creating C wrappers designed to be invoked via Lua's protected call mechanism. If the API routine throws an error, it gets caught and translated into a Perl exception. π
The wrappers are generated in two steps, bestie:
utils/pprotoparses the C prototypes inprotosand generates a YAML database containing the parsed result (protos.yml). It also adds any "hints" contained inproto_hints.yml. πutils/genxsreadsprotos.yml,wrap_xs.tpl, andxs_xs.tpland generateswrap.handxs.h, which are included byAPI.xs.wrap_xs.tplandxs_xs.tplareTemplate::Toolkitformatted code templates.xs.hcontains the Perl XS interface code, andwrap.hcontains the C wrappers for the Lua API routines. π¦
At present the above scripts are invoked manually. π«Ά
mwah π β page brought to you by the bootstrap(3) manual, perl v5.32.1, dated 2022-10-14. slay. π
π¦ where this page comes from
- epel 9: perl-Lua-API 0.04-1.el9 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms