feat(justfile): added justfile with catalog of builds

This commit is contained in:
2026-09-05 07:46:36 -04:00
parent 6a54f2625e
commit 7282b2e134
8 changed files with 1167 additions and 0 deletions

26
web/smoke.cjs Normal file
View File

@@ -0,0 +1,26 @@
"use strict";
const path = require("node:path");
async function main() {
const modulePath = path.resolve(process.argv[2]);
const createModule = require(modulePath);
const module = await createModule({ print() {}, printErr() {} });
const capabilities = JSON.parse(
module.ccall("mfem_demo_capabilities", "string", [], []),
);
const result = JSON.parse(
module.ccall("mfem_demo_solve", "string", ["number", "number"], [6, 2]),
);
if (!capabilities.wasm || !result.ok || result.trueDofs <= 0 || result.iterations <= 0) {
throw new Error(`Unexpected MFEM Wasm result: ${JSON.stringify(result)}`);
}
process.stdout.write(
`MFEM ${capabilities.mfemVersion} Wasm solve: dofs=${result.trueDofs} iterations=${result.iterations} l2=${result.l2Error}\n`,
);
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});