#[export_name = "invoke"]
pub unsafe extern "C" fn invoke(
bytecode_ptr: *const u8,
bytecode_len: usize,
fn_name_ptr: *const u8,
fn_name_len: usize,
)
Expand description
Evaluates QuickJS bytecode and optionally invokes exported JS function with name.
ยงSafety
bytecode_ptr
must reference a valid array of bytes ofbytecode_len
length.- If
fn_name_ptr
is not 0, it must reference a UTF-8 string withfn_name_len
byte length.