Closed TerrorJack closed 1 year ago
cc @sunfishcode
Based on the name __main_void
I assume this does not return the return code? So it seems like the non-zero return code handling should happen inside __main_void
rather than here in this header. But it seems like that isn't happening?
When using
wizer
on a wasi command module andwizer.h
in C/C++, https://github.com/bytecodealliance/wizer/blob/main/include/wizer.h#L103 silently ignores themain
function's non-zero return code. According to https://github.com/WebAssembly/wasi-libc/blob/main/libc-bottom-half/crt/crt1-command.c#L48, non-zero return code should be handled by raising the exception via__wasi_proc_exit
.