Skip to main content

Globals

Convenient shorthands for some frequently-used functionality

Status​

Experimental: Functionality may change for any reason, without semantic versioning guarantees

Availability​

All functions are made available in the global environment and can be accessed directly:

printf("Hello %s", "world") -- Implied global lookup: _G.printf

Constants​

EVO_VERSION​

The build version embedded into the native C++ runtime at compile time, given as a semantic version string in git describe format.

STATIC_FFI_EXPORTS​

A table containing the low-level APIs bound to the Lua environment via LuaJIT's foreign function interface. For details, see this page.

You probably don't need to access these manually unless you want to know which libraries are embedded using this method:

dump-ffi-exports.lua
dump(STATIC_FFI_EXPORTS)

-- Result:
{
webview = <userdata 1>
}

Keep in mind that FFI libraries are generally memory-unsafe, so prefer using the high-level interfaces provided if possible.

Functions​

cast​

Alias for ffi.cast(...).

cdef​

Alias for ffi.cdef(...).

define​

Alias for ffi.cdef(...).

describe​

Alias for bdd.describe(...).

dump​

Alias for debug.dump(...).

extend​

Sets up the metatable of child so that it acts as an instance of parent (in terms of object-oriented programming).

Available since: v0.0.1

format​

Alias for string.format(...).

it​

Alias for bdd.it(...).

new​

Alias for ffi.new(...).

printf​

Alias for print(string.format(...)).

sizeof​

Alias for ffi.sizeof(...).

typeof​

Alias for ffi.typeof(...).

Tables​

buffer​

Alias for string.buffer (LuaJIT builtin).

path​

Alias for the preloaded path library.

Changelog​

VersionWhat happened?
v0.0.1Initial release