#iana #tld #list #domain-name

tld

Top Level domain static hash map, tld list is obtained from of iana.org

50 stable releases

Uses old Rust 2015

2.33.0 Sep 6, 2023
2.32.0 Jul 21, 2023
2.30.0 Nov 27, 2022
2.29.0 Apr 24, 2022
0.2.0 Feb 21, 2017

#427 in Rust patterns

Download history 6/week @ 2023-06-07 12/week @ 2023-06-14 55/week @ 2023-06-21 113/week @ 2023-06-28 7/week @ 2023-07-05 11/week @ 2023-07-12 37/week @ 2023-07-19 20/week @ 2023-07-26 4/week @ 2023-08-02 6/week @ 2023-08-09 55/week @ 2023-08-16 109/week @ 2023-08-23 1/week @ 2023-08-30 77/week @ 2023-09-06 12/week @ 2023-09-13 8/week @ 2023-09-20

152 downloads per month

BSD-3-Clause

47KB
1.5K SLoC

tld Rust

Top Level domain static hash map, tld list is obtained from of iana.org

extern crate tld;

assert!(tld::exist("com"));
assert!(tld::exist("io"));
assert!(tld::exist("lt"));
assert!(tld::exist("ru"));
assert!(tld::exist("de"));

assert!(!tld::exist(""));
assert!(!tld::exist("moc"));

assert!(tld::TLD.len() > 1400);

lib.rs:

TLD - top level domain static map, list is obtained from iana.org.

Crate provides a way to verify top level domain existence.

extern crate tld;

assert!(tld::exist("com"));
assert!(tld::exist("io"));
assert!(tld::exist("lt"));
assert!(tld::exist("ru"));
assert!(tld::exist("de"));

assert!(!tld::exist(""));
assert!(!tld::exist("moc"));

assert!(tld::TLD.len() > 1400);

Dependencies

~135KB