This introduces `SysConfig` to replace `WASIConfig` and formalize documentation around system calls. The only incompatible change planned after this is to switch from wasi.FS to fs.FS Implementation Notes: Defaulting to os.Stdin os.Stdout and os.Stderr doesn't make sense for the same reasons as why we don't propagate ENV or ARGV: it violates sand-boxing. Moreover, these are worse as they prevent concurrency and can also lead to console overload if accidentally not overridden. This also changes default stdin to read EOF as that is safer than reading from os.DevNull, which can run the host out of file descriptors. Finally, this removes "WithPreopens" for "WithFS" and "WithWorkDirFS", to focus on the intended result. Similar Docker, if the WorkDir isn't set, it defaults to the same as root. Signed-off-by: Adrian Cole <adrian@tetrate.io>
9.1 KiB
9.1 KiB