linc_luajit 0.0.1

Haxe/hxcpp @:native bindings for LuaJIT.

Released 2016-11-19.

To install, run:

haxelib install linc_luajit 0.0.1

See using Haxelib in Haxelib documentation for more information.

MaintainerRudenkoArts
Websitehttps://github.com/RudenkoArts/linc_luajit
Current version0.0.1
StatisticsInstalled 9 times
LicenseMIT
Tags bindings, linc, lua, luajit

README.md

linc/LuaJIT

Haxe/hxcpp @:native bindings for LuaJIT.

This is a linc library.


This library works with the Haxe cpp target only.


Example usage

See test/Test.hx

Be sure to read the Lua documentation
www.lua.org/manual/5.1/manual.html

import lua.Lua;
import lua.LuaL;
import lua.State;

class Test {
        
    static function main() {

        var lua:State = LuaL.newstate();
        LuaL.openlibs(lua);
        trace("Lua version: " + Lua.version());
        trace("LuaJIT version: " + Lua.versionJIT());

        LuaL.dofile(lua, "script.lua");

        Lua.getglobal(lua, "foo");

        Lua.pushinteger(lua, 1);
        Lua.pushnumber(lua, 2.0);
        Lua.pushstring(lua, "three");

        Lua.pcall(lua, 3, 0, 1);

        Lua.close(lua);
        
    }

}