lib.rs (1894B)
1 //! [![git]](https://git.philomathiclife.com/rpz/log.html) [![crates-io]](https://crates.io/crates/rpz) [![docs-rs]](crate) 2 //! 3 //! [git]: https://git.philomathiclife.com/git_badge.svg 4 //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust 5 //! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs 6 //! 7 //! `rpz` is a library for the binary `rpz`. 8 //! 9 //! The primary module is [`mod@dom`] which contains types which can parse 10 //! [`str`]s into different kinds of domains. 11 //! 12 //! [`mod@file`] contains types that can read UTF-8 files on the local file system 13 //! or hosted on HTTP(S) servers. 14 //! 15 //! The purpose of these types is to make fetching, parsing, and transforming 16 //! ad-blocking files into a [response policy zone (RPZ)](https://en.wikipedia.org/wiki/Response_policy_zone) 17 //! file easier. 18 #![expect( 19 clippy::doc_paragraphs_missing_punctuation, 20 reason = "false positive for crate documentation having image links and regex expressions for domain types" 21 )] 22 #![expect( 23 clippy::multiple_crate_versions, 24 reason = "dependencies haven't updated to newest crates" 25 )] 26 #![expect( 27 unstable_features, 28 reason = "the only reason we require nightly is for the below features" 29 )] 30 #![cfg_attr(test, expect(dead_code_pub_in_binary, reason = "ignore for tests"))] 31 #![feature(core_io, io_error_more)] 32 /// Module for hostname-like domains including parsing [`str`]s 33 /// from a variety of formats. 34 pub mod dom; 35 /// Contains a single function, `proper_subdomain_count`, that has a lot of lines 36 /// that were pre-generated. 37 mod dom_count_auto_gen; 38 /// Module for fetching and parsing local and HTTP(S) files into 39 /// [`dom::RpzDomain`]s. 40 pub mod file; 41 #[cfg(target_os = "openbsd")] 42 use priv_sep as _; 43 #[cfg(target_os = "openbsd")] 44 use rustls as _; 45 use toml as _;