#tld #domain #psl #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

#4 in #gtld

Download history 36/week @ 2024-03-14 9/week @ 2024-03-21 32/week @ 2024-03-28 28/week @ 2024-04-04 11/week @ 2024-04-11 14/week @ 2024-04-18 15/week @ 2024-04-25 9/week @ 2024-05-02 14/week @ 2024-05-09 26/week @ 2024-05-16 22/week @ 2024-05-23 31/week @ 2024-05-30 16/week @ 2024-06-06 18/week @ 2024-06-13 15/week @ 2024-06-20 4/week @ 2024-06-27

55 downloads per month
Used in psl-codegen

MIT/Apache

12KB
252 lines

PSL Lexer

Parse the Public Suffix List into easy to consume rules


lib.rs:

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")?;

Dependencies

~4–15MB
~223K SLoC