Stream: git-wasmtime

Topic: wasmtime / PR #14868 Improve docs and tests for implements


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

jrandolf opened PR #14868 from jrandolf:implements-docs-tests to bytecodealliance:main:

This fixes docs around implements and named imports that had drifted from the implementation, and adds tests for paths that had no coverage.

Docs:

Tests:

None of the new tests found a bug. I checked that each one fails against a deliberately broken implementation.

Closes #14857

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

jrandolf has marked PR #14868 as ready for review.

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

jrandolf removed the review request for wasmtime-wasi-reviewers from PR #14868.

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

jrandolf requested rvolosatovs for a review on PR #14868.

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

jrandolf requested wasmtime-wasi-reviewers for a review on PR #14868.

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

jrandolf removed the review request for wasmtime-core-reviewers from PR #14868.

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

jrandolf requested pchickey for a review on PR #14868.

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

jrandolf requested wasmtime-core-reviewers for a review on PR #14868.

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

github-actions[bot] added the label wasmtime:api on PR #14868.

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

github-actions[bot] added the label wasi on PR #14868.

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

github-actions[bot] added the label wasmtime:config on PR #14868.

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

github-actions[bot] commented on PR #14868:

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html


<details>

To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.

To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.

Learn more.

</details>

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

:speech_balloon: alexcrichton created PR review comment:

Is there any particular reason to test the deserialize behavior vs assuming it works?

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

:speech_balloon: alexcrichton created PR review comment:

If this is true, this might be a bug -- separate imports are supposed to get separate traits. Lacking this option means that the host can only load the WIT of the shape that was passed in to bindgen!, and the presence of this option means that the host can load components with a variety of shapes of WIT (e.g. arbitrary named keys). -- I think this is the important distinction to make here, if at all.

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

:speech_balloon: alexcrichton created PR review comment:

Are you sure this isn't already tested? IIRC this was added when I first added implements support (or at some point)

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

:speech_balloon: alexcrichton created PR review comment:

Are these added tests really necessary? What is the value added with these new tests?

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

:speech_balloon: alexcrichton created PR review comment:

Why is "(including resource destructors)" necessary here?

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

:memo: alexcrichton submitted PR review:

I'd ask you to please be judicious when adding tests for tests sake. There's an infinite amount of things we could test but we have limited CI resources. It's not worth it to test everything possible, so tests need to carry their weight beyond "seems good".

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

:speech_balloon: alexcrichton created PR review comment:

I think the wording here (and replicated elsewhere) is a bit too strong. While I think it's worthwhile to say that it's recommended that there's only one table it's not strictly required. For example wasi:clocks can work with separate tables I believe due to the resource types being part of the interfaces.

Could this (and other blocks) be re-worded to say that a single table is strongly recommended, but not required in all situations?

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

alexcrichton removed the review request for rvolosatovs from PR #14868.

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

alexcrichton removed the review request for pchickey from PR #14868.

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

jrandolf commented on PR #14868:

Makes sense, I've trimmed the tests down.

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

:memo: jrandolf submitted PR review.

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

:speech_balloon: jrandolf created PR review comment:

Done

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

:memo: jrandolf submitted PR review.

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

:speech_balloon: jrandolf created PR review comment:

Done

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

:memo: jrandolf submitted PR review.

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

:speech_balloon: jrandolf created PR review comment:

I've replaced that paragraph with the distinction you describe. I'm also going to check what the bindings generate today for several labels without named_imports, and follow up if it is a bug.

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

:memo: jrandolf submitted PR review.

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

:speech_balloon: jrandolf created PR review comment:

Done

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

:memo: jrandolf submitted PR review.

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

:speech_balloon: jrandolf created PR review comment:

Done

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

:speech_balloon: jrandolf created PR review comment:

Done

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

:memo: jrandolf submitted PR review.

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

jrandolf edited PR #14868:

This fixes docs around implements and named imports that had drifted from the implementation:

It also fixes the bindgen! implements tests, whose component didn't actually annotate its imports with (implements ...), and checks that external-id is rejected when the feature is disabled.

Closes #14857

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

jrandolf edited a comment on PR #14868:

I've trimmed the tests down.

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

:speech_balloon: jrandolf edited PR review comment.

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

:speech_balloon: jrandolf edited PR review comment.

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

jrandolf updated PR #14868.

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

:thumbs_up: alexcrichton submitted PR review.

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

alexcrichton added PR #14868 Improve docs and tests for implements to the merge queue.

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

:check: alexcrichton merged PR #14868.

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

alexcrichton removed PR #14868 Improve docs and tests for implements from the merge queue.

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

:memo: jrandolf submitted PR review.

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

:speech_balloon: jrandolf created PR review comment:

I checked: it is the case today, and it's by design from #13497. I think it also matches the spec's intent for hosts: the guest gets distinct per-label names, while the host can serve every label with one implementation parameterized by the label, which is what named_imports provides. Different backends per label are still possible with add_to_linker_instance. So I've left it as is, and the docs now describe the distinction you mentioned.


Last updated: Oct 31 2026 at 23:03 UTC