Skip to content
/ lunify Public

A crate for converting Lua bytecode to different versions and formats

License

Notifications You must be signed in to change notification settings

vE5li/lunify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lunify

Tests Code Quality Test Coverage License: MIT crates.io

A crate for converting Lua byte code to different versions and formats.

Currently Lua 5.0 and Lua 5.1 are supported inputs.

Example

use lunify::{Format, LunifyError, Endianness, BitWidth, unify};

// Lua byte code in any suppored format
let input_bytes = include_bytes!("../test_files/lua50.luab");

// Desired output format. May specify pointer width, endianness, sizes of datatypes, ...
let output_format = Format {
    endianness: Endianness::Little,
    // Convert from byte code that runs on a 32 bit machine to byte code that runs on a 64 bit machine
    size_t_width: BitWidth::Bit64,
    ..Format::default()
};

// Convert input bytes to the desired format
let output_bytes = unify(input_bytes, &output_format, &Default::default());

About

A crate for converting Lua bytecode to different versions and formats

Topics

Resources

License

Stars

Watchers

Forks