Wasm_backend.EncodeAppend binary encoding primitives to buffers. Numeric ranges are caller preconditions: the helpers do not check WebAssembly integer bounds.
Append unsigned LEB128. The argument must be nonnegative and fit in an unsigned 32-bit integer.
Append signed LEB128. Use a signed 32-bit argument for an i32 immediate.
Append the element count, then encode each element in order.
Append a byte length followed by the string bytes; no UTF-8 validation.
Build the payload in a fresh buffer, then append its section identifier, byte length, and bytes. Omit the section if the payload buffer is empty. If the callback raises, no section bytes are appended to the destination.