You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where the import starts at 0x12. That has an 00 leading prefix, 01 78 is "x" and then 01 00 is "func index 0". Given all that it's expected that wasm-tools generates an 0x00 leading byte for imports.
Ah thanks for clarifying! You've discovered a situation where wasm-tools was in a "halfway state" in transitioning from one format to another. I've opened bytecodealliance/wasm-tools#1753 to fix this to always emit the 0x00 prefix byte. In that sense this bug is in wasm-tools, not the spec itself, and the spec as-written is correct.
Activity
alexcrichton commentedon Aug 27, 2024
Could you clarify what binary you're using and what you're seeing? Locally I see:
where the import starts at 0x12. That has an 00 leading prefix,
01 78is"x"and then01 00is "func index 0". Given all that it's expected that wasm-tools generates an 0x00 leading byte for imports.dannypsnl commentedon Sep 2, 2024
src/lib.rswit/world.wit:In
Cargo.toml:Use
cargo component buildgettarget/wasm32-wasip1/debug/add.wasm, in this file I gotProceed to the next step in the "remove `interface`" transition
Proceed to the next step in the "remove `interface`" transition
alexcrichton commentedon Sep 3, 2024
Ah thanks for clarifying! You've discovered a situation where wasm-tools was in a "halfway state" in transitioning from one format to another. I've opened bytecodealliance/wasm-tools#1753 to fix this to always emit the 0x00 prefix byte. In that sense this bug is in wasm-tools, not the spec itself, and the spec as-written is correct.
dannypsnl commentedon Sep 6, 2024
I see, thanks for clarifying.
Proceed to the next step in the "remove `interface`" transition (#1753)