Assembly Script
A TypeScript-like language for WebAssembly
S'ensenya a
Eines computacionals en bioinformàticaADNDAW-BIO
Introduction
AssemblyScript compiles a variant of TypeScript (a typed superset of JavaScript) to WebAssembly using Binaryen.
Good use cases for AssemblyScript are computation-heavy logic like image manipulation, hot game logic, specialized algorithms, emulators, compilers, and the likes.
Project
Create a new project with Deno
deno init assemblynpm init -y
npm install --save-dev assemblyscript
npx asinit .This creates assembly/ with index.ts and asconfig.json, plus build scripts in package.json.
Build the WebAssembly module
npm run asbuild # or: npx asc assembly/index.ts --target releaseOutput will be in build/ (e.g., build/release.wasm).
Import and run the WASM in Deno
Create main.ts:
;
await wasmUrl,
, // import object if needed
);
;
2, 3; // expect 5Estàs llegint una vista prèvia.
Inicia sessió amb Google per llegir la pàgina completa.
Inicia sessió amb GoogleAmb qualsevol compte de Google. Només et demanarem que acceptis les condicions del servei.