Constant wasmer_wasix::fs::VIRTUAL_ROOT_FD

source ยท
pub const VIRTUAL_ROOT_FD: Fd = 3;
Expand description

the fd value of the virtual root

Used for interacting with the file system when it has no pre-opened file descriptors at the root level. Normally a WASM process will do this in the libc initialization stage however that does not happen when the WASM process has never been run. Further that logic could change at any time in libc which would then break functionality. Instead we use this fixed file descriptor

This is especially important for fuse mounting journals which use the same syscalls as a normal WASI application but do not run the libc initialization logic