#domain-name #unicode #processing #internationalized #system #url #client

no-std idna

IDNA (Internationalizing Domain Names in Applications) and Punycode

13 unstable releases (5 breaking)

0.5.0 Nov 22, 2023
0.4.0 Jun 5, 2023
0.3.0 Sep 8, 2022
0.2.3 Apr 16, 2021
0.1.0 Mar 30, 2016

#216 in Text processing

Download history 1905720/week @ 2023-12-12 1489025/week @ 2023-12-19 1012533/week @ 2023-12-26 1783935/week @ 2024-01-02 1868592/week @ 2024-01-09 2075265/week @ 2024-01-16 2126586/week @ 2024-01-23 2320017/week @ 2024-01-30 2286391/week @ 2024-02-06 2206363/week @ 2024-02-13 2363824/week @ 2024-02-20 2437077/week @ 2024-02-27 2378433/week @ 2024-03-05 2349990/week @ 2024-03-12 2342056/week @ 2024-03-19 1869888/week @ 2024-03-26

9,372,819 downloads per month
Used in 25,107 crates (70 directly)

MIT/Apache

680KB
16K SLoC

This Rust crate implements IDNA per the WHATWG URL Standard.

It also exposes the underlying algorithms from Unicode IDNA Compatibility Processing (Unicode Technical Standard #46) and Punycode (RFC 3492).

Quoting from UTS #46’s introduction:

Initially, domain names were restricted to ASCII characters. A system was introduced in 2003 for internationalized domain names (IDN). This system is called Internationalizing Domain Names for Applications, or IDNA2003 for short. This mechanism supports IDNs by means of a client software transformation into a format known as Punycode. A revision of IDNA was approved in 2010 (IDNA2008). This revision has a number of incompatibilities with IDNA2003.

The incompatibilities force implementers of client software, such as browsers and emailers, to face difficult choices during the transition period as registries shift from IDNA2003 to IDNA2008. This document specifies a mechanism that minimizes the impact of this transition for client software, allowing client software to access domains that are valid under either system.

Dependencies

~1MB
~43K SLoC