@ai-ecoverse/slicc-kernel 1.186.1 → 1.187.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7997,7 +7997,7 @@ var init_version = __esm({
7997
7997
  "src/version.ts"() {
7998
7998
  "use strict";
7999
7999
  init_captured_globals();
8000
- KERNEL_VERSION = true ? "1.186.1" : "0.0.0-dev";
8000
+ KERNEL_VERSION = true ? "1.187.0" : "0.0.0-dev";
8001
8001
  OS_RELEASE = "6.0.0-slicc";
8002
8002
  }
8003
8003
  });
@@ -20235,7 +20235,7 @@ async function runWasiProcess(init, port3, given = {}) {
20235
20235
  if (!host.fds.isShared) host.fds.share(threads.ids, false);
20236
20236
  };
20237
20237
  }
20238
- const program = await programImports(init.program, host, transport, MAIN_TID);
20238
+ const program = await programImports(init.program, host, transport, MAIN_TID, given.imports);
20239
20239
  const { instance, driver, linkedStack } = await instantiate(host, module, memory, threads, {
20240
20240
  ...fork ? { forked: fork } : {},
20241
20241
  stats,
@@ -20309,9 +20309,9 @@ function programNames2(host, program, warned) {
20309
20309
  warn: (line) => warned.push(line)
20310
20310
  });
20311
20311
  }
20312
- async function programImports(program, host, transport, tid) {
20312
+ async function programImports(program, host, transport, tid, given) {
20313
20313
  if (program.imports === void 0) return void 0;
20314
- const create = await loadImports(program.imports);
20314
+ const create = given ?? await loadImports(program.imports);
20315
20315
  const raw = (req) => transport.call(req, capturedNumber.POSITIVE_INFINITY, req.op);
20316
20316
  return (memory, instance) => create(importsContext({ host, raw, tid, memory, instance }));
20317
20317
  }