From 4c770dd1576ee6eaef1481bfaa45ac264196f977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 16:35:03 +0100 Subject: [PATCH] Add comments to explain IndexMap --- lib/cli/src/commands/run.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index 285ade969..41705044c 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -120,6 +120,11 @@ impl RunWithPathBuf { #[cfg(feature = "wasi")] { + // See https://github.com/wasmerio/wasmer/issues/3492 - + // we need IndexMap to have a stable ordering for the [fs] mapping, + // otherwise overlapping filesystem mappings might not work + // since we want to control the order of mounting directories from the + // wasmer.toml file let default = indexmap::IndexMap::default(); let fs = manifest.fs.as_ref().unwrap_or(&default); for (alias, real_dir) in fs.iter() {