bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
14.82k stars 1.24k forks source link

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

Closed Robbepop closed 6 hours ago

Robbepop commented 4 days ago

Closes https://github.com/bytecodealliance/wasmtime/issues/8894.

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

This was probably an oversight in https://github.com/bytecodealliance/wasmtime/pull/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.