addr-rs / addr

Parse domain names reliably and quickly in Rust
MIT License
51 stars 12 forks source link

Consider pub use psl #11

Closed rusty-snake closed 3 years ago

rusty-snake commented 3 years ago
#[cfg(psl)]
pub use psl;
// or
#[cfg(psl)]
pub use psl::List;

This would allow to use the example from the README w/o adding an additional crate to use this crate.

rushmorem commented 3 years ago

I wanted to make it clear that users can use whatever implementation of the psl_types::List they wanted. But you are right, psl makes for a nice default since it requires no further setup and it is the fastest. Also considering the typical use case for users of a crate like this (parsing domain names and email addresses), I would guess most can do just fine with a static list. Those who need a dynamic list can pull in publicsuffix::List instead.