Stream: git-wasmtime

Topic: wasmtime / issue #9009 `wasi-common/sync` still introduce...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 12:16):

Robbepop opened issue #9009:

Recently we merged https://github.com/bytecodealliance/wasmtime/pull/8900 to remove the wasmtime optional dependency from wasi-common/sync since it was unused mostly.

This had the effect that users could use wasi-common with its sync feature without pulling in the giantic Wasmtime dependency ... or so I thought.
Today I wanted to use wasi-common v23.0.1 (including this improvement) into Wasmi's wasmi_wasi crate and to my surprise Cargo pulled Wasmtime via the wasi-common dependency.
When I removed the sync feature usage (which is kinda critical unfortunately) the Wasmtime dependency was gone.

I am seriously confused as to why this happens. Looking at wasi-common's Cargo.toml file does not help my confusion.
https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-common/Cargo.toml

Any help or clarification?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 12:17):

Robbepop edited issue #9009:

Recently we merged https://github.com/bytecodealliance/wasmtime/pull/8900 to remove the wasmtime optional dependency from wasi-common/sync since it was unused mostly.

This had the effect that users could use wasi-common with its sync feature without pulling in the giantic Wasmtime dependency ... or so I thought.
Today I wanted to use wasi-common v23.0.1 (including this improvement) into Wasmi's wasmi_wasi crate and to my surprise Cargo pulled Wasmtime via the wasi-common dependency.
When I removed the sync feature usage (which is kinda critical unfortunately) the Wasmtime dependency was gone.

I am seriously confused as to why this happens. Looking at wasi-common's Cargo.toml file does not help my confusion.
https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-common/Cargo.toml

Any help or clarification?

tl;dr:

This pulls Wasmtime:

[dependencies]
wasi-common = { version = "23.0.1", default-features = false, features = ["sync"]}

And this does not:

[dependencies]
wasi-common = { version = "23.0.1", default-features = false}

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 12:18):

Robbepop edited issue #9009:

Recently we merged https://github.com/bytecodealliance/wasmtime/pull/8900 to remove the wasmtime optional dependency from wasi-common/sync since it was unused mostly.

This had the effect that users could use wasi-common with its sync feature without pulling in the giantic Wasmtime dependency ... or so I thought.
Today I wanted to use wasi-common v23.0.1 (including this improvement) into Wasmi's wasmi_wasi crate and to my surprise Cargo pulled Wasmtime via the wasi-common dependency.
When I removed the sync feature usage (which is kinda critical unfortunately) the Wasmtime dependency was gone.

I am seriously confused as to why this happens. Looking at wasi-common's Cargo.toml file does not help my confusion.
https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-common/Cargo.toml

Any help or clarification?

tl;dr:

This pulls Wasmtime:

[dependencies]
wasi-common = { version = "23.0.1", default-features = false, features = ["sync"] }

And this does not:

[dependencies]
wasi-common = { version = "23.0.1", default-features = false }

But why?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 12:33):

Robbepop commented on issue #9009:

Here is a Wasmi PR with which you can reproduce the issue: https://github.com/wasmi-labs/wasmi/pull/1140

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 12:55):

Robbepop commented on issue #9009:

Building wasmi_wasi with

cargo build -p wasmi_wasi --no-default-features --verbose

Reveals that somehow the wasmtime feature flag is set:
![image](https://github.com/user-attachments/assets/44f4fa29-57bf-4da5-a478-0e98daabe4a9)

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 13:02):

bjorn3 commented on issue #9009:

According to https://docs.rs/crate/wasi-common/23.0.1/source/Cargo.toml.orig, #8900 is not yet included in wasi-common 23.0.x. Each release branches on the 5th of the month and gets released on the 20th: https://github.com/bytecodealliance/wasmtime/blob/5d0d61602f2dfa5478ef120a86a9009d74ac56bb/.github/workflows/release-process.yml#L23-L24 #8900 got merged on the 8th of this month, which is 3 days after the 23.0 release got branched.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 13:04):

Robbepop commented on issue #9009:

According to https://docs.rs/crate/wasi-common/23.0.1/source/Cargo.toml.orig, #8900 is not yet included in wasi-common 23.0.x. Each release branches on the 5th of the month and gets released on the 20th:

https://github.com/bytecodealliance/wasmtime/blob/5d0d61602f2dfa5478ef120a86a9009d74ac56bb/.github/workflows/release-process.yml#L23-L24
#8900 got merged on the 8th of this month, which is 3 days after the 23.0 release got branched.

Ah okay, that explains why I just successfully built wasi-common without the Wasmtime dependency when using the current main branch of Wasmtime. :face_palm: Good to know.

So this means some more waiting before I can merge the Wasmi PR. Thanks for letting me know!

This issue can be closed then.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2024 at 14:57):

alexcrichton closed issue #9009:

Recently we merged https://github.com/bytecodealliance/wasmtime/pull/8900 to remove the wasmtime optional dependency from wasi-common/sync since it was unused mostly.

This had the effect that users could use wasi-common with its sync feature without pulling in the giantic Wasmtime dependency ... or so I thought.
Today I wanted to use wasi-common v23.0.1 (including this improvement) into Wasmi's wasmi_wasi crate and to my surprise Cargo pulled Wasmtime via the wasi-common dependency.
When I removed the sync feature usage (which is kinda critical unfortunately) the Wasmtime dependency was gone.

I am seriously confused as to why this happens. Looking at wasi-common's Cargo.toml file does not help my confusion.
https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-common/Cargo.toml

Any help or clarification?

tl;dr:

This pulls Wasmtime:

[dependencies]
wasi-common = { version = "23.0.1", default-features = false, features = ["sync"] }

And this does not:

[dependencies]
wasi-common = { version = "23.0.1", default-features = false }

But why?


Last updated: Nov 22 2024 at 16:03 UTC