Stream: git-wasmtime

Topic: wasmtime / PR #5215 Update how exits are modeled in the C...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2022 at 15:25):

alexcrichton opened PR #5215 from update-c-api-traps to main:

Previously extracting an exit code was only possibly on a wasm_trap_t which will never successfully have an exit code on it, so the exit code extractor is moved over to wasmtime_error_t. Additionally extracting a wasm trace from a wasmtime_error_t is added since traces happen on both traps and errors now.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2022 at 17:33):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2022 at 17:35):

alexcrichton merged PR #5215.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 17 2025 at 12:28):

squrky commented on PR #5215:

Hi @alexcrichton thanks for all your good work. I'm trying to understand how to implement proc_exit in a custom C++ wasm host that uses the wasmtime C API. It seems there is no way to return a trap with an exit code from a host function. What am I missing? Thanks.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 17 2025 at 14:27):

alexcrichton commented on PR #5215:

That's a good point, mind filing a dedicated issue about that? (or a PR, should be a small addition)

view this post on Zulip Wasmtime GitHub notifications bot (Jun 17 2025 at 14:49):

squrky commented on PR #5215:

Done, please see https://github.com/bytecodealliance/wasmtime/issues/11061.


Last updated: Dec 13 2025 at 19:03 UTC