We're having a discussion over in .NET land about CLI exit codes. Currently, many of the .NET test cases return an exit code of 100 for success and -1 for error, which worked fine with WASIp1, but since WASIp2 only has an exit
function that takes a result
(i.e. either ok
or err
), we can't do that anymore.
I assume the rationale for not supporting exit codes is that they're not sufficiently portable. Is there more to it than that? Would we ever consider adding an exit-with-code
to a future WASI release?
AFAIK it was just portability where unix only gives you an 8-bit range or something like that and a number of windows return codes are "special" so being able to fake them in WASI felt odd
I think there's a subset of codes though which are the same across OSes which could be supported, probably not a full 32-bit space though
Ah, we just found this: https://github.com/WebAssembly/wasi-cli/issues/11
Last updated: Dec 23 2024 at 12:05 UTC