Closed bjorn3 closed 4 months ago
I don't know if it's possible to implement setjmp/longjmp in Rust. Wasmtime uses C code to call these functions.
They can be implemented using global_asm!()
, right? That is how musl implements it. Glibc either does that or a C function with inline asm mixed in depending on the architecture.
setjmp
/longjmp
are now implemented in #125.
sigsetjmp
/siglongjmp
are implemented in #126.
Many C projects depend on this. For example lua and musl's dynamic linker. And (when
__builtin_setjmp
/__builtin_longjmp
support is not detected) Wasmtime depends on it too.