fn apply_relative_path_mounting_hack(original: &Path) -> PathBuf
Expand description

HACK: We need this so users can mount host directories at relative paths. This assumes that the current directory when a runner starts will be “/”, so instead of mounting to a relative path, we just mount to “/$path”.

This isn’t really a long-term solution because there is no guarantee what the current directory will be. The WASI spec also doesn’t require the current directory to be part of the “main” filesystem at all, we really should be mounting to a relative directory but that isn’t supported by our virtual fs layer.

See https://github.com/wasmerio/wasmer/issues/3794 for more.