Closed calvin2021y closed 1 year ago
The current plan is to wait for the exception-handling proposal to be standardized and implemented in wasm engines, and then to implement setjmp
and longjmp
using that feature. Exception-handling is currently in phase 3.
Another option would be to define a host API which performs stack unwinding. We've so far not pursued this approach, because that would be a lot of complex work for non-JS host API implementors, for what would ultimately be a temporary workaround. And, such an API would not be virtualizable, and would raise complex questions about non-C-language unwinding which the exception-handling proposal already has answers for.
The original question is answered; please file new issues for any further questions!
@sunfishcode According to https://github.com/WebAssembly/exception-handling/issues/179, it seems that most browsers have completed the implementation. It's in Phase 3, but since the implementation has been completed, would it be okay to provide support for it?
Yes, an implementation is now merged into wasi-libc in https://github.com/WebAssembly/wasi-libc/pull/483.
current sdk
./share/wasi-sysroot/include/c++/v1/setjmp.h
is not working.please share the roadmap for this sdk to support setjmp, I want use it in https://github.com/protocolbuffers/upb