Commit 3d6dbbb
authored
Reimplement idna on top of ICU4X (servo#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 versions1 parent de947ab commit 3d6dbbb
File tree
20 files changed
+8442
-30441
lines changed- .github/workflows
- idna
- benches
- src
- tests
- url
- src
20 files changed
+8442
-30441
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
36 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
0 commit comments