callimport-zero-args.txt 271 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
;;; TOOL: run-interp
;;; ARGS: --host-print
(module
  (import "host" "print" (func $imported (result i32)))

  (func (export "f") (result i32)
    i32.const 13
    call $imported
    i32.add))
(;; STDOUT ;;;
called host host.print() => i32:0
f() => i32:13
;;; STDOUT ;;)