Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/docs/assemblyscript-hello-world/wasi-hello.ts
1690 views
1
/**
2
* WASI is enabled through asconfig.json in post 0.20.x versions of AssemblyScript.
3
* The module, @assemblyscript/wasi-shim is required to enable a WASI environment.
4
*
5
* This demo is meant to showcase some abilities of WASI utilized through the AssemblyScript language.
6
* It uses the latest version of AssemblyScript and will not work in older (<0.20.x) versions.
7
**/
8
9
// @assemblyscript/as-wasi overrides console.log to use WASI bindings.
10
// Print text to the terminal.
11
console.log("Hello World from WASI-enabled AssemblyScript utilizing WasmTime!");
12