Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static lists #14

Closed
jprider63 opened this issue Jan 18, 2018 · 4 comments
Closed

Static lists #14

jprider63 opened this issue Jan 18, 2018 · 4 comments

Comments

@jprider63
Copy link
Contributor

I'd like to create Lists statically at compile-time (I don't want to rely on the internet or ship the dat file). I've implemented this here using lazy_static! and include_str!. Currently, this should extract the &str at compile-time and lazily build the list at run-time. Would you be interested in including this static list in this crate?

I just created the pull request #13, which adds a function from_str to create a List. This should eliminate the need to call to_string which might save some memory.

@rushmorem
Copy link
Owner

Thank you. I've just released v1.5.0, which includes your pull request.

Would you be interested in including this static list in this crate?

Since the Public Suffix List is a living document, I prefer that caching strategies, like the psl crate, be maintained externally.

@jprider63
Copy link
Contributor Author

Ok no worries. I'll release staticpublicsuffix as a separate library in case anyone else needs this functionality.

@rushmorem
Copy link
Owner

Cool, thanks.

@rushmorem
Copy link
Owner

@jprider63 You may be interested in the newer replacement of this crate which is a lot faster. See some benchmarks against a C library, libpsl and a PyPy one, publicsuffix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants