github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/imports/wasi_snapshot_preview1/testdata/exit_on_start_unstable.wat (about)

     1  (module $exit_on_start
     2    ;; Old TinyGo (e.g. 0.19) uses wasi_unstable not wasi_snapshot_preview1
     3    (import "wasi_unstable" "proc_exit"
     4      (func $wasi.proc_exit (param $rval i32)))
     5  
     6    (func (export "_start")
     7       i32.const 2           ;; push $rval onto the stack
     8       call $wasi.proc_exit  ;; return a sys.ExitError to the caller
     9    )
    10  )