Function wasmer_wasix::state::run::wasi_exit_code
source · pub(super) fn wasi_exit_code(
result: Result<(), WasiRuntimeError>,
) -> (Result<(), WasiRuntimeError>, ExitCode)
Expand description
Extract the exit code from a Result<(), WasiRuntimeError>
.
We need this because calling exit(0)
inside a WASI program technically
triggers WasiError
with an exit code of 0
, but the end user won’t want
that treated as an error.