nad

Crates.ionad
lib.rsnad
version0.1.0
sourcesrc
created_at2021-03-19 13:04:16.351724
updated_at2021-03-19 13:04:16.351724
descriptionIncomplete Lua VM
homepagehttps://github.com/chikaku/nad
repositoryhttps://github.com/chikaku/nad
max_upload_size
id370972
size70,145
Kevin Chen (chikaku)

documentation

https://docs.rs/nad

README

Nad

Incomplete Lua VM only bytecode is supported for now

Usage

  • Dump function prototype
cargo run -- -dump -debug /path/to/bytecode
# or
cargo install nad
nad -debug -dump /path/to/bytecode
  • Execute bytecode file
cargo run -- -debug /path/to/bytecode
# or
cargo install nad
nad -debug /path/to/bytecode
  • Use nad library
use nad::State;
use nad::Reader;

fn main() {
    let path = "/path/to/bytecode";
    
    // read prototype
    let prototype = Reader::from_file(path).prototype();
    
    // execute main function
    State::from_file(path).call(0, 0);
}

TODO

  • Metatable
  • Iterator
  • Error handler
  • ...
Commit count: 23

cargo fmt