Skip to content

Panic when func has never return #24

Open
@oliverzy

Description

@oliverzy

The following is wasip1 proc_exit function.
;;; Terminate the process normally. An exit code of 0 indicates successful
;;; termination of the program. The meanings of other values is dependent on
;;; the environment.
(@interface func (export "proc_exit")
;;; The exit code returned by the process.
(param $rval $exitcode)
(@WitX noreturn)
)

❯ RUST_BACKTRACE=1 witx-codegen -H -I -o p1.rs -t rust wasi_snapshot_preview1.witx
thread 'main' panicked at /Users/yujie.zhou/.cargo/registry/src/index.crates.io-6f17d22bba15001f/witx-codegen-0.11.3/src/rust/function.rs:22:9:
assertion left == right failed
left: 0
right: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions