Stream: git-wasmtime

Topic: wasmtime / PR #14515 feat(cli): list supported exports in...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2026 at 16:23):

Aditya-9-6 opened PR #14515 from Aditya-9-6:component-supported-exports-error to bytecodealliance:main:

Summary

Improves the error message when failing to execute a WebAssembly component that does not export the expected command or proxy interface handlers.

Closes #14099.

Details

  1. \wasmtime run\:

    • Updates the outer context in \instantiate_and_run\ to refer to \ ailed to run component <target>\ when executing a component (\RunTarget::Component\), while preserving \ ailed to run main module <target>\ for core modules (\RunTarget::Core\).
    • When attempting to instantiate CLI command bindings in \
      un_command_component\, if neither WASIp3 nor WASIp2 bindings match due to missing exports, Wasmtime reports:
      \\\ ext
      The component doesn't export any of the supported handlers. The component must export at least one of:
      an instance of the interface \wasi:cli/run@0.2\`n an instance of the interface \wasi:cli/run@0.3\`n \\\`n (If Preview 3 is disabled via \--wasi p3=n\, only \@0.2\ is listed).
  2. \wasmtime serve\:

    • Updates the outer context in \ServeCommand::execute\ to format \ ailed to serve component <target>\.
    • In \serve_maybe_debug\, if neither WASIp3 \ServicePre\ nor WASIp2 \ProxyPre\ can be instantiated, Wasmtime reports:
      \\\ ext
      The component doesn't export any of the supported handlers. The component must export at least one of:
      an instance of the interface \wasi:http/incoming-handler@0.2\`n an instance of the interface \wasi:http/incoming-handler@0.3\`n \\\`n (If Preview 3 is disabled via \--wasi p3=n\, only \@0.2\ is listed).
  3. Tests:

    • Added \component_missing_run_exports_error\ and \component_missing_serve_exports_error\ in \ ests/all/cli_tests.rs\ asserting the formatted error outputs under default and \--wasi p3=n\ configurations.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2026 at 16:23):

Aditya-9-6 requested pchickey for a review on PR #14515.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2026 at 16:23):

Aditya-9-6 requested wasmtime-core-reviewers for a review on PR #14515.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2026 at 16:23):

Aditya-9-6 edited PR #14515:

Summary

Improves the error message when failing to execute a WebAssembly component that does not export the expected command or proxy interface handlers.

Closes #14099.

Details

  1. wasmtime run:

    • Updates the outer context in instantiate_and_run to refer to failed to run component <target> when executing a component (RunTarget::Component), while preserving failed to run main module <target> for core modules (RunTarget::Core).
    • When attempting to instantiate CLI command bindings in run_command_component, if neither WASIp3 nor WASIp2 bindings match due to missing exports, Wasmtime reports:
      text The component doesn't export any of the supported handlers. The component must export at least one of: an instance of the interface `wasi:cli/run@0.2` an instance of the interface `wasi:cli/run@0.3`
      (If Preview 3 is disabled via --wasi p3=n, only @0.2 is listed).
  2. wasmtime serve:

    • Updates the outer context in ServeCommand::execute to format failed to serve component <target>.
    • In serve_maybe_debug, if neither WASIp3 ServicePre nor WASIp2 ProxyPre can be instantiated, Wasmtime reports:
      text The component doesn't export any of the supported handlers. The component must export at least one of: an instance of the interface `wasi:http/incoming-handler@0.2` an instance of the interface `wasi:http/incoming-handler@0.3`
      (If Preview 3 is disabled via --wasi p3=n, only @0.2 is listed).
  3. Tests:

    • Added component_missing_run_exports_error and component_missing_serve_exports_error in tests/all/cli_tests.rs asserting the formatted error outputs under default and --wasi p3=n configurations.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 13:35):

Aditya-9-6 updated PR #14515.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 07 2026 at 21:58):

:memo: alexcrichton submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 07 2026 at 21:58):

:speech_balloon: alexcrichton created PR review comment:

It's ok to ignore directives like this -- we don't test with features disabled

view this post on Zulip Wasmtime GitHub notifications bot (Oct 07 2026 at 21:58):

:speech_balloon: alexcrichton created PR review comment:

Could this perhaps use the .with_context(|| ...) method on the return value of Command::new?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 07 2026 at 21:58):

:speech_balloon: alexcrichton created PR review comment:

Could this use an exhaustive match instead of an _ catch-all?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 05:19):

Aditya-9-6 updated PR #14515.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 05:20):

:memo: Aditya-9-6 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 05:20):

:speech_balloon: Aditya-9-6 created PR review comment:

Updated to use an exhaustive match on RunTarget::Core(_) and RunTarget::Component(_).

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 05:20):

:memo: Aditya-9-6 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 05:20):

:speech_balloon: Aditya-9-6 created PR review comment:

Updated to use .with_context(|| ...)? on Command::new here, and similarly for ProxyPre::new in serve.rs.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 05:21):

:memo: Aditya-9-6 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 05:21):

:speech_balloon: Aditya-9-6 created PR review comment:

Removed the #[cfg_attr(not(feature = \component-model\), ignore)] directives and made the @0.3 assertions unconditional in both tests.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2026 at 22:28):

alexcrichton commented on PR #14515:

I think you'll need to resolve the merge conflicts to get CI running again here

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 03:27):

Aditya-9-6 updated PR #14515.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 18:34):

:memo: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 18:34):

:speech_balloon: alexcrichton created PR review comment:

Perhaps a bad merge? The second self.serve here seems off


Last updated: Oct 11 2026 at 04:10 UTC