I recently wrote a pallet that uses a (non-substrate) Rust crate as a dependency.
This crate conveniently supports no-std
and Wasm, but it is also quite extensive and there's a lot of code that my pallet simply doesn't use.
When I compile a runtime with this pallet, the resulting wasm blob is way too big (in the order of Mb).
Is there a clever way to make sure that compilation will only include wasm imports that my pallet actually uses, preventing unnecessary bloating of the runtime wasm?