Skip to content

Lua API

IllidanS4 edited this page Sep 23, 2018 · 4 revisions

The main features of YALP are concentrated in the Lua API. It offers 3 packages for various purposes, and also a couple of new functions in standard Lua packages.

By default, the additional packages are not loaded into the global environment, and are to be used via the standard Lua package system, loaded by their name (from the preload table):

local interop = require "interop"
interop.native.print("Hello world!")

This has the advantage of better code isolation, slighly faster access (local vs. global variable), and lazy loading. Some packages like interop may also perform a lot of actions in their loading procedure.

YALP provides these new packages:

Clone this wiki locally