container2wasm icon indicating copy to clipboard operation
container2wasm copied to clipboard

QEMU TCI on WASI

Open gkgoat1 opened this issue 1 year ago • 2 comments

For weval support, one option would to be to use QEMU's TCI and instrument it with weval syscalls. However, weval surrently only supports WASI, which would require QEMU to support WASI, and then the TCI on it as well.

gkgoat1 avatar Jan 28 '25 00:01 gkgoat1

There is QEMU compiled with emscripten (not WASI) at https://github.com/ktock/qemu-wasm so this might be a good start point. To compile TCI for WASI, we need at least the following:

ktock avatar Jan 29 '25 16:01 ktock

There is QEMU compiled with emscripten (not WASI) at https://github.com/ktock/qemu-wasm so this might be a good start point. To compile TCI for WASI, we need at least the following:

Binaryen's asyncify could be one, which powers coroutine libraries like minicoro

  • We might need wasi-thread to enable pthread or modify QEMU to run with single thread

We could also use coroutines to mimic threads with yielding points inserted into QEMU, which would be less of a pain than fully removing threads.

gkgoat1 avatar Jan 29 '25 20:01 gkgoat1