luaur-compile-cli 0.1.3

Command-line Luau source-to-bytecode compiler (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::ffi::c_void;

use alloc::string::String;
use luaur_bytecode::records::bytecode_builder::BytecodeBuilder;

pub unsafe extern "C" fn annotate_instruction(
    context: *mut c_void,
    text: &mut String,
    fid: i32,
    instpos: i32,
) {
    let bcb = &*(context as *const BytecodeBuilder);
    bcb.annotate_instruction(text, fid as u32, instpos as u32);
}