bytecodealliance / wasm-tools

CLI and Rust libraries for low-level manipulation of WebAssembly modules
Apache License 2.0
1.36k stars 245 forks source link

Relax semver-checks to compare worlds in packages with different versions #1886

Closed sunfishcode closed 3 weeks ago

sunfishcode commented 3 weeks ago

In wasm-tools component semver-checks, instead of requiring that the old and new world live in packages with the same id, just require that they have the same name. This allows checking for semver compatibility between different versions of a package, for example, this command:

$ wasm-tools component semver-check --prev wasi:http/proxy@0.2.2 --new wasi:http/proxy@0.2.3 ./wit

in a dirctory with wit/deps/http@0.2.2 contains the current wasi-http wit files, and wit/deps/http@0.2.3 contains a new set of wit files, checks that the new version is semver-compatible.