zla/README.md
2026-07-27 09:23:51 +01:00

549 B

Simple

// --- ZLA ---
var zla: Zla = try .init();
defer zla.deinit();

// --- EXEC FILE ---
try zla.execFromFile(
    void,
    "src/scripts/basic.lua",
);

// --- CALL ---
try zla.call(void, "hello", .{"World"});
try zla.call(void, "hello", .{"..."});

Call function from lua

try zla.call(void, "hello", .{"World"});

Call function from lua with return type

const coords = try zl.call(
    struct { f64, f64 },
    "getCoords",
    .{},
);

Dependancies

sudo pacman -Sy lua --needed