Skip to main content

Module bytes

Module bytes 

Source
Expand description

Helpers for workign with encoding/decoding bytes w.r.t. wasmtime’s custom-encoded sections.

Functions§

pop
Pops a single byte from the front of data, returning it and consuming it from data. Returns None if data is empty.
read_sleb
Reads a sleb-encoded value from data, returning the value and consuming the bytes read from data. Returns None if the encoding is invalid.
read_uleb
Reads a uleb-encoded value from data, returning the value and consuming the bytes read from data. Returns None if the encoding is invalid.
write_sleb
Writes the sleb-encoded value to data.
write_uleb
Writes the uleb-encoded value to data.