Skip to content

Cargo.toml: clap dependency is in [dependencies] but is only needed for the CLI binary #542

@Haroldwonder

Description

@Haroldwonder

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.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions