Skip to main content

encode_argv

Function encode_argv 

Source
pub fn encode_argv(args: &[LoweredArg]) -> Vec<u8> 
Expand description

Helper for tests and host-stub paths: encode a sequence of LoweredArg back into the wire format.

Inverse of parse_argv for scalar values; for Ptr it re-emits the guest_offset / len pair (the resolved host_ptr is host-side state and does not round-trip). This helper makes integration tests readable — they can author argv as vec![LoweredArg::I32(1), ...], encode it, and feed the bytes through the launch path.