Skip to content

NotWaterScriptNhttp/LuaLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LuaLib

Lua binary chunk reader/writer library.

NOTE: using the LuaHelpers will add nothing. It is just for internal classes

Loading a binary chunk

    using LuaLib.Lua;

    Chunk chunk = Chunk.Load("C:/your/file.luac"); // Loads the compiled lua file
    // The chunk contains LuaHeader and MainFunction (The function that holds everything)

Saving a binary chunk

    using LuaLib.Lua;

    Chunk chunk = Chunk.Load("C:/your/file.luac"); // Loads the compiled lua file

    WriterOptions options = new WriterOptions {
        KeepOldMaxStacksize = true,
        KeepLuaVersion = true,
        NewLuaVersion = LuaVersion.LUA_VERSION_X_Y
    };

    // Options do not need to be supplied
    chunk.Write("C:/your/file_out.luac", [options]); // Writes all the functions, constants, etc... out in the form of bytecode

About

a library for reading/writing luac compiled files

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages