Skip to main content

run_binary

Function run_binary 

Source
pub fn run_binary<I, S>(args: I, stdin: Option<&[u8]>) -> Result<BinaryResult>
where I: IntoIterator<Item = S>, S: Into<String>,
Expand description

Run bsdkrun <args> and keep stdout as raw bytes.

run decodes stdout with from_utf8_lossy, which silently replaces every invalid byte with U+FFFD — fine for JSON, ruinous for cp ID:path - reading a PNG. Only stderr is decoded here, because it is always a message.