Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
20
Frontend-Learner/node_modules/unwasm/examples/build.mjs
generated
vendored
Normal file
20
Frontend-Learner/node_modules/unwasm/examples/build.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { fileURLToPath } from "node:url";
|
||||
import { main as asc } from "assemblyscript/asc";
|
||||
|
||||
async function compile(name) {
|
||||
// https://www.assemblyscript.org/compiler.html#programmatic-usage
|
||||
const res = await asc([`${name}.asc.ts`, "-o", `${name}.wasm`], {});
|
||||
|
||||
if (res.error) {
|
||||
console.log(`Compilation failed for ${name}:`, res.error);
|
||||
console.log(res.stderr.toString());
|
||||
} else {
|
||||
console.log(`Compiled: ${name}.wasm`);
|
||||
console.log(res.stdout.toString());
|
||||
}
|
||||
}
|
||||
|
||||
process.chdir(fileURLToPath(new URL(".", import.meta.url)));
|
||||
|
||||
await compile("sum");
|
||||
await compile("rand");
|
||||
Loading…
Add table
Add a link
Reference in a new issue