Description
When a project references cosmwasm_std
crate as one of the dependencies and is being compiled to wasm32 architecture, the package injects entrypoint exports into the final wasm build
cosmwasm/packages/std/src/lib.rs
Lines 111 to 112 in 888552a
It might not be desirable when developing interfaces and libraries that only need certain types like Binary
, Uint128
and so on.
It unnecessarily increases the size when building for Javascript environment and causes issues when building for virtual machines with custom constraints
A possible solution would be to only inject the exports when referencing cosmwasm contract specific entities like entrypoint
or to provide additional feature flag for the crate (e.g. library
) for opting out of injection