scothis requested wasmtime-core-reviewers for a review on PR #14543.
scothis requested cfallin for a review on PR #14543.
scothis opened PR #14543 from scothis:bindgen-prelude-conflict to bytecodealliance:main:
Generated bindings referred to
Result,Option, andcore::...items by bare or relative paths. These broke when a WIT interface defined a type whose name collides with a prelude item, such astype %result = bool;ortype %option = bool;. The generatedpub type Result = bool;would shadow the prelude, so later uses ofResult<...>in the same module failed to compile.Generated code now uses
::core::result::Result,
::core::option::Option, and::core::...for thefmt,error, andconverttraits. This way user-defined type names can't shadow them.Add a codegen test with interface types named
resultandoption, and regenerate the expanded test outputs.A similar change was made in https://github.com/bytecodealliance/wit-bindgen/pull/1676
:thumbs_up: pchickey submitted PR review.
pchickey added PR #14543 bindgen: use fully-qualified paths for prelude types to the merge queue.
:check: pchickey merged PR #14543.
pchickey removed PR #14543 bindgen: use fully-qualified paths for prelude types from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC