Problem
clap is listed in [dependencies] which means it is compiled into the library crate (cdylib). For WASM builds, clap adds unnecessary code size. CLI-only dependencies should be in a separate feature or only in the binary's dependency list.
Location
Cargo.toml
Fix
Move clap to a cli feature or use a [target.'cfg(not(target_arch = "wasm32"))'.dependencies] section so it is excluded from WASM builds.
Problem
clap is listed in [dependencies] which means it is compiled into the library crate (cdylib). For WASM builds, clap adds unnecessary code size. CLI-only dependencies should be in a separate feature or only in the binary's dependency list.
Location
Cargo.toml
Fix
Move clap to a cli feature or use a [target.'cfg(not(target_arch = "wasm32"))'.dependencies] section so it is excluded from WASM builds.