| Crates.io | supply-chain-trust-example-crate-000044 |
| lib.rs | supply-chain-trust-example-crate-000044 |
| version | 1.0.3 |
| created_at | 2024-11-03 19:22:10.691373+00 |
| updated_at | 2025-03-18 15:20:44.588851+00 |
| description | IDNA (Internationalizing Domain Names in Applications) and Punycode. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1434122 |
| size | 923,484 |
idnaIDNA library for Rust implementing UTS 46: Unicode IDNA Compatibility Processing as parametrized by the WHATWG URL Standard.
Apps that need to prepare a hostname for usage in protocols are likely to only need the top-level function domain_to_ascii_cow with AsciiDenyList::URL as the second argument. Note that this rejects IPv6 addresses, so before this, you need to check if the first byte of the input is b'[' and, if it is, treat the input as an IPv6 address instead.
Apps that need to display host names to the user should use uts46::Uts46::to_user_interface. The ToUnicode operation is rarely appropriate for direct application usage.
alloc - For future proofing. Currently always required. Currently, the crate internal may allocate heap but for typical inputs do not allocate on the heap (apart from the output String when applicable).compiled_data - For future proofing. Currently always required. (Passed through to ICU4X.)std - Adds impl std::error::Error for Errors {} (and implies alloc).By default, idna uses ICU4X as its Unicode back end. If you wish to opt for different tradeoffs between correctness, run-time performance, binary size, compile time, and MSRV, please see the README of the latest version of the idna_adapter crate for how to opt into a different Unicode back end.
domain_to_ascii_strict now performs the CheckHyphens check (matching previous documentation).Idna::to_ascii_inner method has been removed. It didn't make sense as a public method, since callers were unable to figure out if there were errors. (A GitHub search found no callers for this method.)compiled_data needs to be explicitly enabled.