Skip to content

wasi-common: remove wasmtime dependency from sync crate feature#8900

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
Robbepop:rf-wasi-common-sync-rm-wasmtime-dep
Jul 8, 2024
Merged

wasi-common: remove wasmtime dependency from sync crate feature#8900
alexcrichton merged 1 commit intobytecodealliance:mainfrom
Robbepop:rf-wasi-common-sync-rm-wasmtime-dep

Conversation

@Robbepop
Copy link
Contributor

@Robbepop Robbepop commented Jul 4, 2024

Closes #8894.

Motivation: This allows usage of wasi-common in non-Wasmtime Wasm runtimes.

This was probably an oversight in #7881.

The only optional usage of the wasmtime crate that I could find within the wasi-common/sync module is the following:

#[cfg(feature = "wasmtime")]
super::define_wasi!(block_on);

Link: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-common/src/sync/mod.rs

Which defines the add_to_linker methods for Wasmtime which is entirely optional.
Non Wasmtime users of wasi-common might want to define their own add_to_linker functions.

Locally I did not see any compile errors with the removal of this dependency of this PR.

@Robbepop Robbepop requested a review from a team as a code owner July 4, 2024 10:06
@Robbepop Robbepop requested review from fitzgen and removed request for a team July 4, 2024 10:06
@github-actions github-actions bot added the wasi Issues pertaining to WASI label Jul 4, 2024
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue Jul 8, 2024
Merged via the queue into bytecodealliance:main with commit cf101c0 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasi Issues pertaining to WASI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wasi-common: Does sync crate feature really rely on wasmtime dependency?

2 participants