/zig-luajit

🦎 🌔 Zig build of the LuaJIT repository created by @MikePall.

Primary LanguageZigMIT LicenseMIT

🦎 🌔 zig luajit

CI License

Zig build of the LuaJIT repository created by Mike Pall.

🚀 Usage

  1. Add luajit as a dependency in your build.zig.zon.

    build.zig.zon example
    .{
        .name = "<name_of_your_package>",
        .version = "<version_of_your_package>",
        .dependencies = .{
            .luajit = .{
                .url = "https://github.com/tensorush/zig-luajit/archive/<git_tag_or_commit_hash>.tar.gz",
                .hash = "<package_hash>",
            },
        },
    }

    Set <package_hash> to 12200000000000000000000000000000000000000000000000000000000000000000, and Zig will provide the correct found value in an error message.

  2. Add luajit as a module in your build.zig.

    build.zig example
    const luajit = b.dependency("luajit", .{});
    exe.addModule("luajit", luajit.artifact("lib"));