j
jaipkg.dev
packages / binding / luajit-jai

luajit-jai

afdd287binding

Jai bindings for LuaJIT

MIT · updated 7 months ago

LuaJIT bindings for Jai

Jai bindings for LuaJIT.

Current Support

  • Linux x64

Installation

# create modules folder if it doesn't exist.
mkdir -p modules

# clone bindings into modules/luajit
git clone https://github.com/xyaman/luajit-jai.git modules/luajit

Usage

Simple example: examples/main.jai.

Dynamic Linking

Library is linked statically by default. You can change this by using optional module parameter:

#import "luajit"(USE_STATIC_LIB=false);

Generate bindings

This command will clone the LuaJIT repository (v2.1 branch), compile it, and replace the current folder and architecture-specific libraries. I want to add more flexibility in the future.

Example:

  • Linux x64 → linux/x64/libluajit.so and linux/x64/libluajit0.a
jai generate.jai