#tld #psl #domain #cctld #gtld

psl-lexer

A lexer for Mozilla's Public Suffix List

7 releases

0.3.1 Mar 1, 2021
0.3.0 Feb 28, 2021
0.2.3 Feb 27, 2021
0.2.0 Jul 18, 2018
0.1.0 Jul 9, 2018

#3 in #gtld

Download history 7/week @ 2025-01-15 7/week @ 2025-01-22 27/week @ 2025-01-29 166/week @ 2025-02-05 20/week @ 2025-02-12 15/week @ 2025-02-19 41/week @ 2025-02-26 20/week @ 2025-03-12 19/week @ 2025-03-19 11/week @ 2025-03-26 3/week @ 2025-04-02 29/week @ 2025-04-09

64 downloads per month
Used in psl-codegen

MIT/Apache

12KB
252 lines

Public Suffix List Lexer

All this library does is provide methods for fetching and parsing Mozilla's Public Suffix List. You may be interested in higher level libraries like psl.

Examples

use psl_lexer::List;

// Fetch the list from the official URL,
let list = List::fetch()?;

// from your own URL
let list = List::from_url("https://example.com/path/to/public_suffix_list.dat")?;

// or from a local file.
let list = List::from_path("/path/to/public_suffix_list.dat")?;

PSL Lexer

Parse the Public Suffix List into easy to consume rules

Dependencies

~5–16MB
~236K SLoC