| Crates.io | ada-idna |
| lib.rs | ada-idna |
| version | 0.1.0 |
| created_at | 2025-06-25 20:56:29.639514+00 |
| updated_at | 2025-06-25 20:56:29.639514+00 |
| description | Fast IDNA (Internationalized Domain Names in Applications) implementation in Rust |
| homepage | |
| repository | https://github.com/ada-url/idna-rust |
| max_upload_size | |
| id | 1726419 |
| size | 247,960 |
⚠️ This library is incomplete and under development ⚠️
This is a Rust implementation of the IDNA (Internationalized Domain Names in Applications) specification, based on the C++ implementation from ada-url/ada.
Fast and compliant IDNA conversion library for Rust with zero dependencies.
This library provides IDNA processing capabilities for converting between Unicode domain names and ASCII-compatible encoding (ACE) using Punycode. It implements the IDNA specification for internationalized domain name handling.
This is a Rust port of the IDNA functionality from github.com/ada-url/idna.
use ada_idna::domain::{to_ascii, to_unicode};
// Convert Unicode domain to ASCII
let ascii_domain = to_ascii("café.example").unwrap();
assert_eq!(ascii_domain, "xn--caf-dma.example");
// Convert ASCII back to Unicode
let unicode_domain = to_unicode("xn--caf-dma.example").unwrap();
assert_eq!(unicode_domain, "café.example");
🚧 This implementation is incomplete and not ready for production use.
Known limitations:
# Build the library
cargo build
# Run tests
cargo test
# Run clippy
cargo clippy
# Format code
cargo fmt
src/domain.rs - Main IDNA conversion functionssrc/punycode.rs - Punycode encoding/decodingsrc/mapping.rs - Character mapping and case foldingsrc/normalization.rs - Unicode NFC normalizationsrc/validation.rs - Character and domain validationsrc/unicode.rs - UTF-8 ↔ UTF-32 conversion utilitiessrc/unicode_tables.rs - Unicode lookup tablestests/ - Comprehensive test suiteThis project is part of the Ada URL family of libraries. Contributions are welcome!
This project is licensed under either of
at your option.