While Tools/wasm/wasi looks for /opt/wasi-sdk by default, that's not the natural directory that tarballs of the WASI SDK extract to. It makes sense to support discovery of the appropriate WASI SDK based on the supported WASI SDK version when it's extracted directly into /opt.
Starting with WASI SDK 23, the tarballs went from containing a directory named wasi-sdk-{WASI_SDK_VERSION}.0 to e.g. wasi-sdk-{WASI_SDK_VERSION}.0-x86_64-linux.
Linked PRs