luaur-code-gen 0.1.0

Native (A64/X64) code generation for Luau (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::functions::get_native_proto_exec_data_header_native_proto_exec_data_alt_b::get_native_proto_exec_data_header;
use crate::records::shared_code_gen_context::SharedCodeGenContext;

impl SharedCodeGenContext {
    pub unsafe extern "C" fn on_destroy_function(execdata: *mut core::ffi::c_void) {
        let native_proto_exec_data_header =
            get_native_proto_exec_data_header(execdata as *const u32);
        unsafe {
            (*native_proto_exec_data_header)
                .native_module
                .as_ref()
                .unwrap()
                .release();
        }
    }
}