idna_adapter

Crates.ioidna_adapter
lib.rsidna_adapter
version
sourcesrc
created_at2024-07-03 12:10:46.447319
updated_at2024-12-12 08:06:55.85568
descriptionBack end adapter for idna
homepagehttps://docs.rs/crate/idna_adapter/latest
repositoryhttps://github.com/hsivonen/idna_adapter
max_upload_size
id1290460
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Manish Goregaokar (Manishearth)

documentation

https://docs.rs/idna_adapter/latest/idna_adapter/

README

idna_adapter

This crate abstracts over a Unicode back end for the idna crate.

To work around the lack of global-features in Cargo, this crate allows the top level Cargo.lock to choose an alternative Unicode back end for the idna crate by pinning a version of this crate.

idna depends on version 1 of this crate. The version stream 1.2.x uses ICU4X, the version stream 1.1.x uses unicode-rs, and the version stream 1.0.x has a stub implementation without an actual Unicode back end.

It is generally a good idea to refer to the README of the latest version instead of the guidance below for up-to-date information about what options are available.

ICU4X as the default

If you take no action, Cargo will choose the 1.2.x version stream i.e. ICU4X.

Opting to use ICU4X 2.0.0-beta1

To choose ICU4X 2.0.0-beta1, run cargo update -p idna_adapter --precise 1.2.1-beta.1 in the top-level directory of your application.

Opting to use unicode-rs

To choose unicode-rs, run cargo update -p idna_adapter --precise 1.1.0 in the top-level directory of your application.

Compared to ICU4X, this makes build times faster, MSRV lower, binary size larger, and run-time performance slower.

Turning off IDNA support

Since the ability to turn off actual IDNA processing has been requested again and again, an option to have no Unicode back end is provided. Choosing this option obviously breaks the idna crate in the sense that it cannot provide a proper implementation of UTS 46 without any Unicode data. Choosing this option makes your application reject non-ASCII domain name inputs and will fail to enforce the UTS 46 requirements on domain names that have labels in the Punycode form.

Using this option is not recommended, but to make the idna crate not actually support IDNA, run cargo update -p idna_adapter --precise 1.0.0 in the top-level directory of your application.

Commit count: 9

cargo fmt