Stream: git-wasmtime

Topic: wasmtime / PR #9091 Generate async drop methods for resou...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 08 2024 at 09:20):

badeend requested wasmtime-core-reviewers for a review on PR #9091.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 08 2024 at 09:20):

badeend requested pchickey for a review on PR #9091.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 08 2024 at 09:20):

badeend opened PR #9091 from badeend:async-drop to bytecodealliance:main:

Add the ability to generate async drop methods for resources.

In the component model, resource.drop is a canonical built-in without a proper name. So I invented a custom naming scheme for the component bindgen config. I went with: "[drop]{resource-name}" where {resource-name} is the name as defined in WIT. e.g. "[drop]input-stream".

This shouldn't conflict with anything existing in the wild as WIT identifiers are not allowed to contain square brackets.


To the reviewer: please double check resource_async. I'm not familiar with this part of the codebase.


Spawned off from https://github.com/bytecodealliance/wasmtime/issues/9058. This change is a prerequisite for a potential solution of that issue, but seems useful enough on its own.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 08 2024 at 09:26):

badeend updated PR #9091.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 08 2024 at 09:41):

badeend updated PR #9091.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2024 at 15:17):

alexcrichton submitted PR review:

Everything looks good to me, thanks! Would you be up for adding a test for this as well?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2024 at 18:46):

badeend commented on PR #9091:

If you're looking for something to test this feature in isolation I'd be glad to add a test for it, but could you point me towards where the component model tests live currently? I tried looking for them in the usual places but couldn't find them.

If all you're after is that this is tested _somehow_ and don't care about the test being in isolation or not, I've got a follow-up PR planned for https://github.com/bytecodealliance/wasmtime/issues/9058 that will be using this feature. So it will be tested indirectly through that.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2024 at 19:01):

alexcrichton commented on PR #9091:

Yes I think that this would be good to have a dedicated test for just this. Component-model API tests live at https://github.com/bytecodealliance/wasmtime/tree/main/tests/all/component_model and https://github.com/bytecodealliance/wasmtime/blob/main/tests/all/component_model/async.rs has some examples of doing async things

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 08:12):

badeend updated PR #9091.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 09:18):

badeend commented on PR #9091:

Check!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 14:44):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 15:00):

alexcrichton merged PR #9091.


Last updated: Nov 22 2024 at 16:03 UTC