Tags: servo/rust-url
Tags
Merge idna-v1x to main (#990) * Adjust Punycode overflow checks * The change made in 1.0.0 incorrectly assumed that the input length limit removed the need to do overflow check when decoding. Now the internal-caller length limit is taken as a permission to skip overflow checks only when encoding. * The RFC gives overflow checking pre-flight math for languages like that don't have checked math. Since Rust does, the code now uses checked_add and checked_mul instead of pre-flight when overflow checks are performed. * Remove no_std category (crates.io doesn't support it, and it is now rejected), use keywords instead * Add benches that use the main idna 1.0 entry point in idna and url * Put the Unicode back end behind an adapter crate * Split fastest ASCII fast path from the rest * Bench hyphen in a domain that is otherwise lower-case ASCII * Adjust MSRV * Add README remarks about alternative Unicode back ends * Change the idna_adapter dependency to crates.io * Address clippy lints * Increment version number of idna to 1.0.3 * Test MSRV with idna unicode-rs back end and test ICU4X back end with 1.67 * Prepare url crate for publication with idna 1.0.3 (#987) --------- Co-authored-by: Manish Goregaokar <[email protected]> Co-authored-by: Valentin Gosu <[email protected]>
Merge idna-v1x to main (#990) * Adjust Punycode overflow checks * The change made in 1.0.0 incorrectly assumed that the input length limit removed the need to do overflow check when decoding. Now the internal-caller length limit is taken as a permission to skip overflow checks only when encoding. * The RFC gives overflow checking pre-flight math for languages like that don't have checked math. Since Rust does, the code now uses checked_add and checked_mul instead of pre-flight when overflow checks are performed. * Remove no_std category (crates.io doesn't support it, and it is now rejected), use keywords instead * Add benches that use the main idna 1.0 entry point in idna and url * Put the Unicode back end behind an adapter crate * Split fastest ASCII fast path from the rest * Bench hyphen in a domain that is otherwise lower-case ASCII * Adjust MSRV * Add README remarks about alternative Unicode back ends * Change the idna_adapter dependency to crates.io * Address clippy lints * Increment version number of idna to 1.0.3 * Test MSRV with idna unicode-rs back end and test ICU4X back end with 1.67 * Prepare url crate for publication with idna 1.0.3 (#987) --------- Co-authored-by: Manish Goregaokar <[email protected]> Co-authored-by: Valentin Gosu <[email protected]>
Remove no_std category (crates.io doesn't support it, and it is now r… …ejected), use keywords instead
Revert "Reimplement idna on top of ICU4X" (#946) * Revert "Reimplement idna on top of ICU4X (#923)" This reverts commit 3d6dbbb. See #937 for reasons behind this backout. * Bump url version to 2.5.2 * Pin unicode-width to 0.1.12 to avoid build failure in rust 1.56 * Remove ambiguous_wide_pointer_comparisons to maybe resolve clippy error * fix clippy
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
PreviousNext