Module oc_wasm_safe::extref

source ·
Expand description

Out-of-line byte-array and string reference types for more efficient CBOR encoding.

This module defines two reference types, one for byte arrays and one for strings. A value of such a type holds a reference to the specified byte array or string. When such a reference is CBOR-encoded, rather than copying the entire byte array or string into the output, a small External Reference object is written containing the pointer to and length of the byte array or string. This CBOR can be passed to OC-Wasm which will read the data directly from its original memory location, eliminating the need to allocate enough memory and copy the data into the CBOR output.

Structs§

  • A reference to a byte array.
  • A reference to a text string.