Skip to main content

parse_argv

Function parse_argv 

Source
pub fn parse_argv(buf: &[u8], mem: &[u8]) -> Result<Vec<LoweredArg>, AbiError>
Expand description

Parse a tagged-argv byte buffer into a host-side Vec<LoweredArg>.

mem is the caller’s linear-memory snapshot (as exposed by wasmtime::Memory::data); pointer arguments are bounds-checked against it.

The parser is strict: it rejects any byte left over after the last record, refuses unknown tag bytes, and refuses an over-long buffer or too-many-args count. The intent is that a malformed buffer is detected here, before any CUDA call.

Errors: