I'm having trouble compiling wasmtime-wasi
.
I'm on stable-aarch64-apple-darwin
, Rust 1.70
My other dependencies are
[dependencies]
wasmtime = { version = "=10.0.1", features = ["component-model"] }
wasmtime-wasi = "=10.0.1"
anyhow = "1"
transformer = { path = "../transformer" }
tokio = { version = "1.11.0", features = ["rt-multi-thread", "macros"] }
Compiling wasmtime-wasi v10.0.1
error[E0631]: type mismatch in function arguments
--> /Users/vallahiboyle/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-wasi-10.0.1/src/preview2/preview2/filesystem.rs:408:26
|
408 | atim.map(cap_fs_ext::SystemTimeSpec::from_std),
| --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | expected due to this
| | found signature defined here
| required by a bound introduced by this call
|
= note: expected function signature `fn(fs_set_times::SystemTimeSpec) -> _`
found function signature `fn(fs_set_times::system_time_spec::SystemTimeSpec) -> _`
note: required by a bound in `std::option::Option::<T>::map`
--> /Users/vallahiboyle/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1095:12
|
1095 | F: ~const FnOnce(T) -> U,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
error[E0631]: type mismatch in function arguments
--> /Users/vallahiboyle/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-wasi-10.0.1/src/preview2/preview2/filesystem.rs:409:26
|
409 | mtim.map(cap_fs_ext::SystemTimeSpec::from_std),
| --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | expected due to this
| | found signature defined here
| required by a bound introduced by this call
|
= note: expected function signature `fn(fs_set_times::SystemTimeSpec) -> _`
found function signature `fn(fs_set_times::system_time_spec::SystemTimeSpec) -> _`
note: required by a bound in `std::option::Option::<T>::map`
--> /Users/vallahiboyle/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1095:12
|
1095 | F: ~const FnOnce(T) -> U,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
error[E0631]: type mismatch in function arguments
--> /Users/vallahiboyle/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-wasi-10.0.1/src/preview2/preview2/filesystem.rs:414:26
|
414 | atim.map(cap_fs_ext::SystemTimeSpec::from_std),
| --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | expected due to this
| | found signature defined here
| required by a bound introduced by this call
|
= note: expected function signature `fn(fs_set_times::SystemTimeSpec) -> _`
found function signature `fn(fs_set_times::system_time_spec::SystemTimeSpec) -> _`
note: required by a bound in `std::option::Option::<T>::map`
--> /Users/vallahiboyle/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1095:12
|
1095 | F: ~const FnOnce(T) -> U,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
error[E0631]: type mismatch in function arguments
--> /Users/vallahiboyle/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-wasi-10.0.1/src/preview2/preview2/filesystem.rs:415:26
|
415 | mtim.map(cap_fs_ext::SystemTimeSpec::from_std),
| --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | expected due to this
| | found signature defined here
| required by a bound introduced by this call
|
= note: expected function signature `fn(fs_set_times::SystemTimeSpec) -> _`
found function signature `fn(fs_set_times::system_time_spec::SystemTimeSpec) -> _`
note: required by a bound in `std::option::Option::<T>::map`
--> /Users/vallahiboyle/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1095:12
|
1095 | F: ~const FnOnce(T) -> U,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
For more information about this error, try `rustc --explain E0631`.
error: could not compile `wasmtime-wasi` (lib) due to 4 previous errors
Some help would be appreciated thanks a lot :pray:
The error seems simple but since it is a published package I suppose this is happening because of a version clash of some sort.
I've also filed an issue
https://github.com/bytecodealliance/wasmtime/issues/6674
A workaround for this is pinning.
[dependencies]
wasmtime-wasi = "=10.0.1"
cap-fs-ext = "=1.0.15"
cap-primitives = "=1.0.15"
cap-std = "=1.0.15"
cap-x
1.0.16
and up is the issue.
When we run cargo clean
or update
the transative dependency goes above 1.0.15
.
I still leave it open since the maintainers would update to 1.0.16
and above in cap
dependencies.
This issue is resolved. :tada:
https://github.com/bytecodealliance/cap-std/issues/324
https://github.com/bytecodealliance/wasmtime/issues/6674#event-9690975285
Last updated: Nov 22 2024 at 17:03 UTC