Public dry run dryrun-1714a9eedd5b

Source commit: 1714a9eedd5b1e30c6c9aceb7a999f2f695ba83c

Public tree identity: sha256:e5daffad23fa7c7f1822adccd3c3b4ee0bc7f1a45e0d321eb9a6fb8282b269db
This commit is contained in:
Disasmer release dry run 2026-07-03 17:31:04 +02:00
commit 20c72e6066
102 changed files with 32054 additions and 0 deletions

View file

@ -0,0 +1,115 @@
#!/usr/bin/env node
const assert = require("assert");
const cp = require("child_process");
const fs = require("fs");
const path = require("path");
const repo = path.resolve(__dirname, "..");
const wasmTarget = path.join(
repo,
"target",
"wasm32-unknown-unknown",
"debug",
"launch_build_demo.wasm"
);
cp.execFileSync(
"cargo",
["build", "-p", "launch-build-demo", "--target", "wasm32-unknown-unknown"],
{ cwd: repo, stdio: "inherit" }
);
assert(fs.existsSync(wasmTarget), `missing compiled Wasm module at ${wasmTarget}`);
const output = cp.execFileSync(
"cargo",
[
"run",
"-q",
"-p",
"disasmer-node",
"--bin",
"disasmer-wasmtime-smoke",
"--",
wasmTarget,
"task_add_one",
"41",
"42",
],
{ cwd: repo, encoding: "utf8" }
);
const report = JSON.parse(output);
assert.strictEqual(report.type, "wasmtime_task_smoke");
assert.strictEqual(report.export, "task_add_one");
assert.strictEqual(report.arg, 41);
assert.strictEqual(report.result, 42);
const debugOutput = cp.execFileSync(
"cargo",
[
"run",
"-q",
"-p",
"disasmer-node",
"--bin",
"disasmer-wasmtime-smoke",
"--",
"--debug-freeze-resume",
wasmTarget,
"task_add_one",
"41",
"42",
],
{ cwd: repo, encoding: "utf8" }
);
const debugReport = JSON.parse(debugOutput);
assert.strictEqual(debugReport.type, "wasmtime_debug_freeze_resume_smoke");
assert.strictEqual(debugReport.export, "task_add_one");
assert.strictEqual(debugReport.task, "task_add_one");
assert.strictEqual(debugReport.frozen_state, "Frozen");
assert.strictEqual(debugReport.resumed_state, "Running");
assert(debugReport.stack_frames.some((frame) => String(frame).includes("task_add_one")));
assert(
debugReport.local_values.some(
([name, value]) => name === "wasm_local_0" && String(value).includes("41")
),
"Wasmtime debug snapshot must expose the real i32 argument as a frame local"
);
assert.strictEqual(debugReport.node_runtime_captured_wasm_locals, true);
assert.strictEqual(debugReport.result, 42);
assert.strictEqual(debugReport.node_runtime_reached_wasm_task, true);
const hostCommandOutput = cp.execFileSync(
"cargo",
[
"run",
"-q",
"-p",
"disasmer-node",
"--bin",
"disasmer-wasmtime-smoke",
"--",
"--host-command",
],
{ cwd: repo, encoding: "utf8" }
);
const hostCommandReport = JSON.parse(hostCommandOutput);
assert.strictEqual(hostCommandReport.type, "wasmtime_host_command_smoke");
assert.strictEqual(hostCommandReport.export, "compile-linux");
assert.strictEqual(hostCommandReport.export_result, 0);
assert.strictEqual(hostCommandReport.virtual_thread, "compile-linux");
assert.strictEqual(hostCommandReport.stdout, "linux-build-artifact");
assert.strictEqual(
hostCommandReport.staged_artifact.path,
"/vfs/artifacts/linux/app.tar.zst"
);
assert.strictEqual(hostCommandReport.large_bytes_uploaded, false);
assert.strictEqual(hostCommandReport.manifest_objects, 1);
assert.strictEqual(hostCommandReport.node_host_import, "disasmer.cmd_run");
assert.strictEqual(hostCommandReport.flagship_linux_build_task, true);
assert.strictEqual(hostCommandReport.node_executed_host_command, true);
assert.strictEqual(hostCommandReport.hosted_control_plane_ran_command, false);
console.log("Wasmtime node smoke passed");