alexcrichton opened PR #7069 from alexcrichton:configure-resource-types
to bytecodealliance:main
:
This commit adds support to
component::bindgen!
to specify resource types using thewith
key of the macro. This can be used to configure theT
ofResource<T>
to use a preexisting type rather than unconditionally generating a new empty enum to have a fresh type.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #7069.
alexcrichton requested wasmtime-core-reviewers for a review on PR #7069.
alexcrichton updated PR #7069.
pchickey submitted PR review.
pchickey created PR review comment:
it doesnt look like the foo/foo/a cases are covered here
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Oh I don't think that's actually possible via WIT right now since resources are either top-level imports, in an anonymous import, or in an interface which these three cases map to
pchickey submitted PR review.
pchickey created PR review comment:
what exercises the
a
from line 46 andb
from line 47?
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Ah that's
foo/a
andfoo/b
. The name of the world being "foo" is probably confusing here since the name of the world isn't used for these strings at all. The syntax here is definitely a bit made up by me and isn't exactly specified in WIT at all or anything like that.
pchickey submitted PR review.
pchickey created PR review comment:
got it! thank you.
pchickey submitted PR review.
pchickey merged PR #7069.
Last updated: Nov 22 2024 at 16:03 UTC