Subwasm is a cli utility to look inside a Substrate WASM Runtime. It can inspect and compare the metadata of Substrate based runtimes such as Polkadot or Kusama.
Since subwasm 0.15.0 and the fix of a bug that resulted in decompressing anything we got on chain before storing the file, we now remain true to what is on chain.
The idea with this new feature would be a new sub command that can compress and decompress at will. Since we can already fetch a runtime on chain with the get command, we could stick with simply (de)compressing wasm from/to a local file.
Specs from Sergei:
[x] Ideally, this tool could be installed. cargo install may be a good way to do that since it seems that it should be available for the majority of the target users. Maybe it would be better to put into another repo to make the install quick.
[x] It's possible that the file is already decompressed, in such a case we probably want to put a warning into stderr.
[ ] This utility should be able to dump into stdout, but only if requested.
The motivation comes from https://github.com/paritytech/substrate/issues/10161.
Since
subwasm 0.15.0
and the fix of a bug that resulted in decompressing anything we got on chain before storing the file, we now remain true to what is on chain.The idea with this new feature would be a new sub command that can compress and decompress at will. Since we can already fetch a runtime on chain with the
get
command, we could stick with simply (de)compressing wasm from/to a local file.Specs from Sergei: