The AssemblyScript workbench

asc, log, compile & run, and privacy.

asc compiles, then WASM runs. main is the entry.

Goal

Log 1 from main.

@external("env", "log")
declare function log(n: i32): void;

@external("env", "logStr")
declare function logStr(s: string): void;

export function main(): void {
  log(1);
}
@external("env", "log")
declare function log(n: i32): void;

@external("env", "logStr")
declare function logStr(s: string): void;

export function main(): void {
  logStr("Nairobi");
  log(12);
}