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");
|
||||
1
Frontend-Learner/node_modules/unwasm/examples/env.mjs
generated
vendored
Normal file
1
Frontend-Learner/node_modules/unwasm/examples/env.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const seed = () => Math.random() * Date.now()
|
||||
5
Frontend-Learner/node_modules/unwasm/examples/package.json
generated
vendored
Normal file
5
Frontend-Learner/node_modules/unwasm/examples/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"imports": {
|
||||
"#env": "./env.mjs"
|
||||
}
|
||||
}
|
||||
BIN
Frontend-Learner/node_modules/unwasm/examples/rand.wasm
generated
vendored
Normal file
BIN
Frontend-Learner/node_modules/unwasm/examples/rand.wasm
generated
vendored
Normal file
Binary file not shown.
BIN
Frontend-Learner/node_modules/unwasm/examples/sum.wasm
generated
vendored
Normal file
BIN
Frontend-Learner/node_modules/unwasm/examples/sum.wasm
generated
vendored
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue