Skip to content
This repository was archived by the owner on Jan 1, 2019. It is now read-only.

3F/KeraLua

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

[ obsolete ]

KeraLua - has been replaced on new LunaRoad !

Use master branch if you need modifications for KeraLua


LunaRoad represents a fully new flexible platform to work with Lua. Works via powerful Conari engine !

Build status NuGet package License

Easy to start:

using(var l = new Lua<ILua51>("Lua.dll")) { 
    // ... 
    // ILua51, ILua52, ILua53, ...
}

Flexible binding with any exported function of library:

  • Dynamic features / DLR:

It does not require API level at all, we will generate all this automatically at runtime ! Easy and works well.

// all this will be generated at runtime, i.e. you can use all of what you need from Lua as you like:
dlr.pushcclosure(L, onProc, 0);
dlr.setglobal(L, "onKeyDown");
...
LuaNumber num = dlr.tonumber<LuaNumber>(L, 7);
  • Lambda expressions:
// custom binding:
using(ILua l = new Lua("Lua52.dll"))
{
    l.bind<Action<LuaState, LuaCFunction, int>>("pushcclosure")(L, onProc, 0);
    l.bind<Action<LuaState, string>>("setglobal")(L, "onKeyDown");
    //or any exported function like: bindFunc<...>("_full_name_")
    ...
    LuaNumber num = l.bind<Func<LuaState, int, LuaNumber>>("tonumber")(L, 7);
}

// API layer:
using(var l = new Lua<ILua53>("Lua53.dll"))
{
    l.API.pushcclosure(L, onProc, 0); // ILua53 lua = l.API
    l.API.setglobal(L, "onKeyDown");
}

Since the LunaRoad works over Conari, it also does not require the creation of any additional delegate. We'll do it automatically instead of you. [?]

and more ...

Enjoy.

About

Replaced by LunaRoad project: https://github.com/3F/LunaRoad

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published