Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement idna on top of ICU4X (#923)
* Reimplement idna on top of ICU4X * Add an even faster lower-case ASCII letter path to avoid regressing performance * Comments and verify_dns_length tweak * Parametrize internal vs. external Punycode caller; restore external API behavior * Add bench for to_ascii on an already-Punycode name * Avoid re-encoding Punycode when possible * Pass through the input slice in many more cases * Add testing for the simultaneous mode * Omit the invalid domain character check on the url side * Document that Punycode labels must result in non-ASCII * Rename files called uts46.rs to deprecated.rs * Rename uts46bis to uts46 * Tweak docs * Avoid useless copying and useless UTF-8 decode * Use inline(never) to optimize binary size * Split CheckHyphens into a separate concern form the ASCII deny list * Make the ASCII deny list customizable * Better docs and top-level functions * Parameter for VerifyDNSLength * Restore support for transitional processing to minimize breakage * In the deprecated API, use empty deny list with use_std3_ascii_rules=false * Tweak docs * Docs, rename AsciiDenyList::WHATWG to ::URL, tweak top-level functions * Use idna crate top-level function in the url crate to dogfood the top-level function * Add an Usage section to the README * Add an early return to map_transitional for readability * Document internal vs. external Punycode caller differences * Per discussion with Valentin, revert deprecated API to the old behavior that does not check hyphens in positions 3 and 4 * Add comments about not fixing deprecated API * Add a comment explaining FailFast in deprecated.rs * For future-proofing, add compiled_data cargo feature (currently always required) Since other changes in this changeset require a semver break anyway, this change takes a semver break in the case of `default-features = false` in order to avoid a future semver break if in the future a need to add a bring-your-own-data (using `icu_provider`) constructor for `Uts46` shows up. * Remove remark about spec violation by making root dot permissibility configurable * Clarify README about IDNA 2003/2008 * Add a historical remark to the README * Fix typo * Depend on crates.io versions of icu_normalizer and icu_properties * Address clippy lints * Update versions * Increment dependency versions
- Loading branch information