Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

381 B
Raw Blame
;;! bulk_memory = true
;;! function_references = true
;;! stack_switching = true
(module
  (type $ft (func))
  (type $ct (cont $ft))

  (func $noop)
  (elem declare func $noop)

  (func $make-cont (result (ref $ct))
     (cont.new $ct (ref.func $noop)))

  (func $f (export "f") (result i32)
     (call $make-cont)
     (ref.is_null))
)

(assert_return (invoke "f") (i32.const 0))