alexcrichton opened PR #8065 from alexcrichton:fix-gen-bindings-for-dead-code to bytecodealliance:main:
This commit fixes a bindgen problem where dead types, which had no generated bindings, could be referred to from other dead types, which did have generated bindings. The fix is to not generate code for dead types at all by fixing how type information is analyzed.
Closes #8057
alexcrichton requested fitzgen for a review on PR #8065.
alexcrichton requested wasmtime-core-reviewers for a review on PR #8065.
pchickey submitted PR review.
pchickey created PR review comment:
Not clear to me how this tests liveness since both interfaces are part of the imports?
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Ah good point, I should clarify, liveness is calculated in terms of what's used by imported/exported functions. No function actually uses
dead-typeorvbutlive-typeis used by a function, and so we don't generate bindings fordead-typeand this PR fixes a bug where we previously tried to generate bindings forvdespite nothing using it.
alexcrichton requested dicej for a review on PR #8065.
alexcrichton requested elliottt for a review on PR #8065.
elliottt submitted PR review.
elliottt created PR review comment:
Does doing this step first mean that the calls to
self.type_infointype_info_funcshould never traverse the whole type (due to the early exit if the entry exists already)?
elliottt submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Not for this, but the below bits would still need it for setting the owned/borrowed bits.
It's probably best to switching this to
LiveSetone day as a future refactoring
alexcrichton merged PR #8065.
Last updated: Dec 13 2025 at 19:03 UTC