wasmedge_sys::ffi

Function WasmEdge_BytesWrap

Source
pub unsafe extern "C" fn WasmEdge_BytesWrap(
    Buf: *const u8,
    Len: u32,
) -> WasmEdge_Bytes
Expand description

Create the WasmEdge_Bytes wraps to the buffer.

This function creates a WasmEdge_Bytes object which wraps to the input buffer. The caller should guarantee the life cycle of the input buffer, and should NOT call the WasmEdge_BytesDelete.

\param Buf the buffer to wrap to the WasmEdge_Bytes object. \param Len the buffer length.

\returns bytes object refer to the input buffer with its length.