WebAssembly / wasi-libc

WASI libc implementation for WebAssembly
https://wasi.dev
Other
812 stars 188 forks source link

add `__wasilibc_reset_preopens` #489

Closed dicej closed 1 month ago

dicej commented 2 months ago

This resets the preopens table to an uninitialized state, forcing it to be reinitialized next time it is needed. This is useful when pre-initializing using e.g. wizer or component-init. Such tools are capable of taking a snapshot of a running application which may later be resumed on an unrelated runtime (which may have its own, unrelated preopens).

sunfishcode commented 1 month ago

Makes sense, thanks!