#tld #org #iana

tld

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

53 stable releases

Uses old Rust 2015

2.36.0 Aug 6, 2024
2.35.0 Feb 17, 2024
2.34.0 Jan 31, 2024
2.33.0 Sep 6, 2023
0.2.0 Feb 21, 2017

#377 in Network programming

Download history 981/week @ 2024-12-13 648/week @ 2024-12-20 176/week @ 2024-12-27 427/week @ 2025-01-03 544/week @ 2025-01-10 379/week @ 2025-01-17 617/week @ 2025-01-24 826/week @ 2025-01-31 943/week @ 2025-02-07 538/week @ 2025-02-14 1078/week @ 2025-02-21 1302/week @ 2025-02-28 936/week @ 2025-03-07 1078/week @ 2025-03-14 1024/week @ 2025-03-21 819/week @ 2025-03-28

4,090 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);

Dependencies

~140KB