wasi-common: don't rely on platform dependent "NUL" device
If stdio is not inherited nor associated with a file, WasiCtxBuilder
tries to open "/dev/null" ("NUL" on Windows) and attach stdio to it.
While most platforms today support those device files, it would be
good to avoid unnecessary access to the host device if possible. This
patch instead uses a virtual Handle that emulates the "NUL" device.
This commit is contained in:
@@ -39,6 +39,6 @@ pub use ctx::{WasiCtx, WasiCtxBuilder, WasiCtxBuilderError};
|
||||
pub use handle::{Handle, HandleRights};
|
||||
pub use sys::osdir::OsDir;
|
||||
pub use sys::osfile::OsFile;
|
||||
pub use sys::osother::{OsOther, OsOtherExt};
|
||||
pub use sys::osother::OsOther;
|
||||
pub use sys::preopen_dir;
|
||||
pub use virtfs::{FileContents, VirtualDirEntry};
|
||||
|
||||
Reference in New Issue
Block a user