Skip to content

feat: implement missing async arg result handling - #1342

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
vados-cosmonic:feat=implement-missing-async-arg-result-handling
Jul 25, 2025
Merged

feat: implement missing async arg result handling#1342
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
vados-cosmonic:feat=implement-missing-async-arg-result-handling

Conversation

@vados-cosmonic

Copy link
Copy Markdown
Contributor

This commit implements some (but not all) of the async argument and parameter handling that is emitted for function calls.

@vados-cosmonic
vados-cosmonic marked this pull request as draft July 25, 2025 11:13
@vados-cosmonic
vados-cosmonic force-pushed the feat=implement-missing-async-arg-result-handling branch from 8227b40 to 3badd19 Compare July 25, 2025 11:23
This commit implements some (but not all) of the async argument and
parameter handling that is emitted for function calls.
@vados-cosmonic
vados-cosmonic force-pushed the feat=implement-missing-async-arg-result-handling branch from 3badd19 to 398d8ce Compare July 25, 2025 11:34
@vados-cosmonic
vados-cosmonic marked this pull request as ready for review July 25, 2025 11:34
@vados-cosmonic

Copy link
Copy Markdown
Contributor Author

The Test Async failure seems to be pre-existing (and "allowed to fail") so I'm figuring I can ignore it for now.

I also don't think this PR would have been the one to fix that, given the error, but if so willing to dig in!

Before (on `main`)
------ Failure: cancel-import --------
  runner: tests/runtime-async/async/cancel-import/runner.c
  compiled runner: /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/cancel-import/runner-c.wasm
  test: tests/runtime-async/async/cancel-import/test.rs
  compiled test: /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/cancel-import/test-rust.wasm
  error: failed to run `cancel-import`
  
  Caused by:
      command execution failed
      command: "/home/runner/work/wit-bindgen/wit-bindgen/wasmtime-dev-x86_64-linux/wasmtime" "-W" "component-model-async" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/cancel-import/composed-runner.c-test.rs.wasm"
      status: signal: 6 (SIGABRT) (core dumped)
      stderr:
        
        thread 'main' panicked at /home/runner/work/wasip3-prototyping/wasip3-prototyping/crates/wasmtime/src/runtime/component/func/typed.rs:223:67:
        called `Result::unwrap()` on an `Err` value: entry has children
        note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This PR
------ Failure: cancel-import --------
  runner: tests/runtime-async/async/cancel-import/runner.c
  compiled runner: /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/cancel-import/runner-c.wasm
  test: tests/runtime-async/async/cancel-import/test.rs
  compiled test: /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/cancel-import/test-rust.wasm
  error: failed to run `cancel-import`
  
  Caused by:
      command execution failed
      command: "/home/runner/work/wit-bindgen/wit-bindgen/wasmtime-dev-x86_64-linux/wasmtime" "-W" "component-model-async" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/cancel-import/composed-runner.c-test.rs.wasm"
      status: signal: 6 (SIGABRT) (core dumped)
      stderr:
        
        thread 'main' panicked at /home/runner/work/wasip3-prototyping/wasip3-prototyping/crates/wasmtime/src/runtime/component/func/typed.rs:223:67:
        called `Result::unwrap()` on an `Err` value: entry has children
        note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@alexcrichton alexcrichton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! And yeah I've been meaning to look at that failure but haven't had a chance to get around to it yet

@alexcrichton
alexcrichton added this pull request to the merge queue Jul 25, 2025
Merged via the queue into bytecodealliance:main with commit 7ece07d Jul 25, 2025
21 of 22 checks passed
@vados-cosmonic
vados-cosmonic deleted the feat=implement-missing-async-arg-result-handling branch July 28, 2025 12:19
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

Successfully merging this pull request may close these issues.

2 participants