File: wasi-hello.ts

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 48,492 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (11 lines) | stat: -rw-r--r-- 560 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
/**
 * WASI is enabled through asconfig.json in post 0.20.x versions of AssemblyScript.
 * The module, @assemblyscript/wasi-shim is required to enable a WASI environment.
 * 
 * This demo is meant to showcase some abilities of WASI utilized through the AssemblyScript language.
 * It uses the latest version of AssemblyScript and will not work in older (<0.20.x) versions.
**/

// @assemblyscript/as-wasi overrides console.log to use WASI bindings.
// Print text to the terminal.
console.log("Hello World from WASI-enabled AssemblyScript utilizing WasmTime!");