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:
AbiError::KernelArgsUnsupported— buffer exceeds the sanity caps (MAX_KERNEL_ARGS/MAX_KERNEL_ARGS_BYTES).AbiError::InvalidArgs— buffer is malformed (unknown tag, trailing bytes, value bytes truncated against a tag).AbiError::InvalidPointer— a pointer arg’s[ptr, ptr+len)window lies outsidemem.