alexcrichton opened PR #8721 from alexcrichton:full-bindings-generation-each-time
to bytecodealliance:main
:
Currently with the
bindgen!
macro when thewith
key is used then the generated bindings are different than if thewith
key was not used. Not only for replacement purposes but the generated bindings are missing two key pieces:
In the generated
add_to_linker
functions bounds and invocations ofwith
-overridden interfaces are all missing. This means that the generatedadd_to_linker
functions don't actually represent the full world.The generated module hierarchy has "holes" for all the modules that are overridden. While it's mostly a minor inconvenience it's also easy enough to generate everything via
pub use
to have everything hooked up correctly.After this PR it means that each
bindgen!
macro should, in isolation, work for any otherbindgen!
macro invocation. It shouldn't be necessary to weave things together and remember how each macro was invoked along the way. This is primarily to unblock #8715 which is running into a case where tcp/udp are generated as sync but their dependency,wasi:sockets/network
, is used from an upstream async version. The generatedadd_to_linker
does not compile because tcp/udp depend onwasi:sockets/network
isn't added to the linker. After fixing that it then required more modules to be generated, hence this PR.<!--
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 pchickey for a review on PR #8721.
alexcrichton requested wasmtime-core-reviewers for a review on PR #8721.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
This was a bug from before this PR and probably shouldn't have ever worked...
lann submitted PR review.
alexcrichton has enabled auto merge for PR #8721.
pchickey submitted PR review:
cc @MendyBerger can you see if this improves any of the code we looked at together earlier this week?
alexcrichton merged PR #8721.
MendyBerger commented on PR #8721:
@pchickey I'm unable to get the code to compile when I rebase on top of this git rev.
Let me know if it's important that I test it. If so, I'll spend some more time on this. It's probably something minor.
MendyBerger edited a comment on PR #8721:
@pchickey I'm unable to get the code to compile when I rebase on top of this git rev.
Let me know if it's important that I test it. If so, I'll spend some more time on this.
MendyBerger edited a comment on PR #8721:
@pchickey I'm unable to get the code to compile when I rebase on top of this git rev.
Let me know if it's important that I test it. If so, I'll spend some more time on it.
Last updated: Nov 22 2024 at 16:03 UTC