rpz

Response policy zone (RPZ) file generator.
git clone https://git.philomathiclife.com/repos/rpz
Log | Files | Refs | README

lib.rs (1804B)


      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 #![feature(io_error_more)]
     31 /// Module for hostname-like domains including parsing [`str`]s
     32 /// from a variety of formats.
     33 pub mod dom;
     34 /// Contains a single function, `proper_subdomain_count`, that has a lot of lines
     35 /// that were pre-generated.
     36 mod dom_count_auto_gen;
     37 /// Module for fetching and parsing local and HTTP(S) files into
     38 /// [`dom::RpzDomain`]s.
     39 pub mod file;
     40 #[cfg(target_os = "openbsd")]
     41 use priv_sep as _;
     42 #[cfg(target_os = "openbsd")]
     43 use rustls as _;
     44 use toml as _;