aumetra added the bug label to Issue #10184.
aumetra opened issue #10184:
Test Case
Steps to Reproduce
- Install latest rustc version (
rustc 1.86.0-nightly (f027438f8 2025-02-03)
)- Create new cargo project
- Add
wasmtime-wasi
dependency- Try to compile
Expected Results
The program compiles without issues
Actual Results
error[E0080]: evaluation of constant value failed --> /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:147:9 | 147 | / wasmtime::component::bindgen!({ 148 | | path: "wit", 149 | | world: "wasi:cli/command", 150 | | tracing: true, ... | 180 | | require_store_data_send: true, 181 | | }); | |__________^ the evaluated program panicked at 'assertion failed: 1 == <DirectoryEntry as wasmtime::component::ComponentType>::ALIGN32', /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:147:9 | = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation of constant value failed --> /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:327:5 | 327 | / wasmtime::component::bindgen!({ 328 | | path: "wit", 329 | | world: "wasi:cli/command", 330 | | tracing: true, ... | 416 | | }, 417 | | }); | |______^ the evaluated program panicked at 'assertion failed: 1 == <DirectoryEntry as wasmtime::component::ComponentType>::ALIGN32', /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:327:5
Versions and Environment
Wasmtime version or commit: 29.0.1 on crates.io
Operating system: Linux 6.13.0 #1-NixOS SMP PREEMPT_DYNAMIC Sun Jan 19 23:51:45 UTC 2025 x86_64 GNU/Linux
Architecture: x85_64
Extra Info
N/A
alexcrichton commented on issue #10184:
Thanks for the report! This is due to https://github.com/bytecodealliance/wasm-tools/pull/1999 which was a buggy implementation in a dependency of Wasmtime. I'll work on getting this fix out for Wasmtime as well. Fixing end-user builds will requiring updating the
wit-parser
crate that Wasmtime depends on. It'll take a moment to publish builds of fixed versions ofwit-parser
though because that will require a lot of patch releases for a crate where we don't have a great patch release process.At this time there's unfortunately no fix though, so if folks run into this you'll need to pin nightlies to an older nightly temporarily.
alexcrichton commented on issue #10184:
Ok here's what I've done to fix this:
- I've made a patch release of the
wit-parser
crate, the crate at fault here, for all versions that are affected.- I've updated Wasmtime's
main
andrelease-{30,29.28}.0.0
branches.This means that
cargo install wasmtime-cli@29.0.0 --locked
will continue to fail, but if--locked
is removed, for example, then it will succeed. Embedders using Wasmtime shouldn't be affected since they should be able to use the latestwit-parser
dependency which will fix this issue.The only remaining question is whether we want to publish a patch release of Wasmtime's release branches with an updated lock file. Personally I'd lean towards "no" but others might feel differently so I don't want to prematurely close this.
@aumetra can you confirm on your end that if you run
cargo update -p wit-parser
that the issue is resolved?
pchickey commented on issue #10184:
The only remaining question is whether we want to publish a patch release of Wasmtime's release branches with an updated lock file. Personally I'd lean towards "no" but others might feel differently so I don't want to prematurely close this.
I also lean towards "no" since in this case its as easy as dropping
--locked
on the cli install, and there is no bug in any of the published binaries. If a user can present some case we haven't thought of where they can't be flexible, I guess we can do it, but lets not unless asked.
aumetra commented on issue #10184:
can you confirm on your end that if you run
cargo update -p wit-parser
that the issue is resolved?Verified. Updated the dependency on my program and now it successfully builds again
alexcrichton commented on issue #10184:
I've added this as a discussion item to our next agenda which is in a bit due to the wasm cg meeting happening next week. Regardless though thanks @aumetra for confirming that updating
wit-parser
works!
alexcrichton closed issue #10184:
Test Case
Steps to Reproduce
- Install latest rustc version (
rustc 1.86.0-nightly (f027438f8 2025-02-03)
)- Create new cargo project
- Add
wasmtime-wasi
dependency- Try to compile
Expected Results
The program compiles without issues
Actual Results
error[E0080]: evaluation of constant value failed --> /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:147:9 | 147 | / wasmtime::component::bindgen!({ 148 | | path: "wit", 149 | | world: "wasi:cli/command", 150 | | tracing: true, ... | 180 | | require_store_data_send: true, 181 | | }); | |__________^ the evaluated program panicked at 'assertion failed: 1 == <DirectoryEntry as wasmtime::component::ComponentType>::ALIGN32', /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:147:9 | = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation of constant value failed --> /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:327:5 | 327 | / wasmtime::component::bindgen!({ 328 | | path: "wit", 329 | | world: "wasi:cli/command", 330 | | tracing: true, ... | 416 | | }, 417 | | }); | |______^ the evaluated program panicked at 'assertion failed: 1 == <DirectoryEntry as wasmtime::component::ComponentType>::ALIGN32', /home/aumetra/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasmtime-wasi-29.0.1/src/bindings.rs:327:5
Versions and Environment
Wasmtime version or commit: 29.0.1 on crates.io
Operating system: Linux 6.13.0 #1-NixOS SMP PREEMPT_DYNAMIC Sun Jan 19 23:51:45 UTC 2025 x86_64 GNU/Linux
Architecture: x85_64
Extra Info
N/A
alexcrichton commented on issue #10184:
I think that this is now handled, so closing.
Last updated: Feb 28 2025 at 03:10 UTC