Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when func has never return #24

Open
oliverzy opened this issue Dec 18, 2024 · 0 comments
Open

Panic when func has never return #24

oliverzy opened this issue Dec 18, 2024 · 0 comments

Comments

@oliverzy
Copy link

oliverzy commented Dec 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant