Skip to content

cargo: make idna-related dependencies optional - #401

Open
Fumesover wants to merge 3 commits into
Keats:masterfrom
Fumesover:albin/less-deps
Open

cargo: make idna-related dependencies optional#401
Fumesover wants to merge 3 commits into
Keats:masterfrom
Fumesover:albin/less-deps

Conversation

@Fumesover

Copy link
Copy Markdown

The idna dependency is currently bringing a massive amount of dependencies.

With this PR, I propose to make it optional (but enabled by default). This ensures there's no breaking changes, but allows a user to manually disable the features, going from 43 unique dependencies to 15 unique dependencies.

# before
~$> cargo tree -p validator --no-default-features
validator v0.21.0 (/tmp/tmp.DLFPYjnD2O/validator/validator)
├── idna v1.1.0
│   ├── idna_adapter v1.2.2
│   │   ├── icu_normalizer v2.3.0
│   │   │   ├── icu_collections v2.3.0
│   │   │   │   ├── displaydoc v0.2.7 (proc-macro)
│   │   │   │   │   ├── proc-macro2 v1.0.107
│   │   │   │   │   │   └── unicode-ident v1.0.24
│   │   │   │   │   ├── quote v1.0.47
│   │   │   │   │   │   └── proc-macro2 v1.0.107 (*)
│   │   │   │   │   └── syn v3.0.5
│   │   │   │   │       ├── proc-macro2 v1.0.107 (*)
│   │   │   │   │       ├── quote v1.0.47 (*)
│   │   │   │   │       └── unicode-ident v1.0.24
│   │   │   │   ├── potential_utf v0.1.6
│   │   │   │   │   └── zerovec v0.11.8
│   │   │   │   │       ├── yoke v0.8.3
│   │   │   │   │       │   ├── stable_deref_trait v1.2.1
│   │   │   │   │       │   ├── yoke-derive v0.8.2 (proc-macro)
│   │   │   │   │       │   │   ├── proc-macro2 v1.0.107 (*)
│   │   │   │   │       │   │   ├── quote v1.0.47 (*)
│   │   │   │   │       │   │   ├── syn v2.0.119
│   │   │   │   │       │   │   │   ├── proc-macro2 v1.0.107 (*)
│   │   │   │   │       │   │   │   ├── quote v1.0.47 (*)
│   │   │   │   │       │   │   │   └── unicode-ident v1.0.24
│   │   │   │   │       │   │   └── synstructure v0.13.2
│   │   │   │   │       │   │       ├── proc-macro2 v1.0.107 (*)
│   │   │   │   │       │   │       ├── quote v1.0.47 (*)
│   │   │   │   │       │   │       └── syn v2.0.119 (*)
│   │   │   │   │       │   └── zerofrom v0.1.8
│   │   │   │   │       │       └── zerofrom-derive v0.1.7 (proc-macro)
│   │   │   │   │       │           ├── proc-macro2 v1.0.107 (*)
│   │   │   │   │       │           ├── quote v1.0.47 (*)
│   │   │   │   │       │           ├── syn v2.0.119 (*)
│   │   │   │   │       │           └── synstructure v0.13.2 (*)
│   │   │   │   │       ├── zerofrom v0.1.8 (*)
│   │   │   │   │       └── zerovec-derive v0.11.6 (proc-macro)
│   │   │   │   │           ├── proc-macro2 v1.0.107 (*)
│   │   │   │   │           ├── quote v1.0.47 (*)
│   │   │   │   │           └── syn v3.0.5 (*)
│   │   │   │   ├── utf8_iter v1.0.4
│   │   │   │   ├── yoke v0.8.3 (*)
│   │   │   │   ├── zerofrom v0.1.8 (*)
│   │   │   │   └── zerovec v0.11.8 (*)
│   │   │   ├── icu_normalizer_data v2.3.0
│   │   │   ├── icu_provider v2.3.1
│   │   │   │   ├── displaydoc v0.2.7 (proc-macro) (*)
│   │   │   │   ├── icu_locale_core v2.3.0
│   │   │   │   │   ├── displaydoc v0.2.7 (proc-macro) (*)
│   │   │   │   │   ├── litemap v0.8.3
│   │   │   │   │   ├── tinystr v0.8.4
│   │   │   │   │   │   ├── displaydoc v0.2.7 (proc-macro) (*)
│   │   │   │   │   │   └── zerovec v0.11.8 (*)
│   │   │   │   │   ├── writeable v0.6.4
│   │   │   │   │   └── zerovec v0.11.8 (*)
│   │   │   │   ├── writeable v0.6.4
│   │   │   │   ├── yoke v0.8.3 (*)
│   │   │   │   ├── zerofrom v0.1.8 (*)
│   │   │   │   ├── zerotrie v0.2.5
│   │   │   │   │   ├── displaydoc v0.2.7 (proc-macro) (*)
│   │   │   │   │   ├── yoke v0.8.3 (*)
│   │   │   │   │   └── zerofrom v0.1.8 (*)
│   │   │   │   └── zerovec v0.11.8 (*)
│   │   │   ├── smallvec v1.16.0
│   │   │   └── zerovec v0.11.8 (*)
│   │   └── icu_properties v2.3.0
│   │       ├── displaydoc v0.2.7 (proc-macro) (*)
│   │       ├── icu_collections v2.3.0 (*)
│   │       ├── icu_locale_core v2.3.0 (*)
│   │       ├── icu_properties_data v2.3.0
│   │       ├── icu_provider v2.3.1 (*)
│   │       ├── zerotrie v0.2.5 (*)
│   │       └── zerovec v0.11.8 (*)
│   ├── smallvec v1.16.0
│   └── utf8_iter v1.0.4
├── regex v1.13.1
│   ├── regex-automata v0.4.18
│   │   └── regex-syntax v0.8.11
│   └── regex-syntax v0.8.11
├── serde v1.0.229
│   └── serde_core v1.0.229
├── serde_derive v1.0.229 (proc-macro)
│   ├── proc-macro2 v1.0.107 (*)
│   ├── quote v1.0.47 (*)
│   └── syn v3.0.5 (*)
├── serde_json v1.0.151
│   ├── itoa v1.0.18
│   ├── memchr v2.8.3
│   ├── serde_core v1.0.229
│   └── zmij v1.0.23
└── url v2.5.8
    ├── form_urlencoded v1.2.2
    │   └── percent-encoding v2.3.2
    ├── idna v1.1.0 (*)
    └── percent-encoding v2.3.2

# after
~$> cargo tree -p validator --no-default-features
validator v0.21.0 (/tmp/tmp.DLFPYjnD2O/validator/validator)
├── regex v1.13.1
│   ├── regex-automata v0.4.18
│   │   └── regex-syntax v0.8.11
│   └── regex-syntax v0.8.11
├── serde v1.0.229
│   └── serde_core v1.0.229
├── serde_derive v1.0.229 (proc-macro)
│   ├── proc-macro2 v1.0.107
│   │   └── unicode-ident v1.0.24
│   ├── quote v1.0.47
│   │   └── proc-macro2 v1.0.107 (*)
│   └── syn v3.0.5
│       ├── proc-macro2 v1.0.107 (*)
│       ├── quote v1.0.47 (*)
│       └── unicode-ident v1.0.24
└── serde_json v1.0.151
    ├── itoa v1.0.18
    ├── memchr v2.8.3
    ├── serde_core v1.0.229
    └── zmij v1.0.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant