javy_plugin_api

Function invoke

Source
#[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 of bytecode_len length.
  • If fn_name_ptr is not 0, it must reference a UTF-8 string with fn_name_len byte length.