[package] name = "url-cleaner" version = "0.6.2" edition = "2021" description = "A CLI tool and library for URL manipulation with a focus on stripping tracking garbage." repository = "https://github.com/Scripter17/url-cleaner" keywords = ["url", "url-tracking", "privacy"] categories = ["command-line-utilities"] license = "AGPL-3.0-or-later" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] clap = { version = "4.5.21", features = ["derive", "unstable-v5"] } serde = { version = "1.0.215", features = ["derive"] } serde_json = "1.0.133" url = { version = "2.5.4", features = ["serde"] } reqwest = { version = "0.12.9", features = ["blocking", "socks"], optional = true } const-str = { version = "0.5.7", optional = true } thiserror = "2.0.3" regex = { version = "1.11.1", optional = true } glob = { version = "0.3.1", optional = true } psl = "2.1.60" form_urlencoded = "1.2.1" regex-syntax = { version = "0.8.5", optional = true } percent-encoding = "2.3.1" which = { version = "7.0.0", optional = true } base64 = { version = "0.22.1", optional = true } diesel = { version = "2.2.5", features = ["sqlite", "returning_clauses_for_sqlite_3_35"], optional = true } [features] default = [ "default-config", "minify-included-strings", "regex", "glob", "commands", "http", "advanced-http", "base64", "cache-redirects" ] # Include default-config.json in the binary. default-config = [] # Replace all whitepace in the default config with just one space. minify-included-strings = ["dep:const-str"] # Enables [`url_cleaner::glue::RegexWrapper`]. regex = ["dep:regex", "dep:regex-syntax"] # Enables [`url_cleaner::glue::GlobWrapper`]. glob = ["dep:glob"] # Enables HTTP stuff. http = ["dep:reqwest"] # Enables [`types::RequestConfig`]. advanced-http = ["http", "reqwest/json", "reqwest/cookies"] # Enables caching various operations. cache = ['dep:diesel'] # Read and write the result of [`url_cleaner::types::Mapper::ExpandShortLink`] from and to redirect-cache.txt. cache-redirects = ["cache"] base64 = ["dep:base64"] # Adds `Custom` variants to the main tools which allow using function pointers. # These cannot be serialized or deserialized and are more powerful than the `commands` feature, so it's also disabled by default. custom = [] # Enables [`url_cleaner::glue::CommandWrapper`]. commands = ["dep:which"] # Print debug info at various points. # Wrapping specific items in their own Debug variants gives much more detail, but this can show you where to wrap stuff. # The exact effects of this feature are currently unspecified, not covered in any stability guarantees, and should not be parsed unless you're willing to rewrite the parser at stupid times for stupider reasons. debug = [] # Print various timing info. # The exact effects of this feature are currently unspecified, not covered in any stability guarantees, and should not be parsed unless you're willing to rewrite the parser at stupid times for stupider reasons. debug-time = [] # https://stackoverflow.com/a/54842093/10720231 [profile.release] opt-level = 3 # 3 gives +30% size and -20% time compared to 'z' lto = true # Enable link-time optimization codegen-units = 1 # Reduce number of codegen units to increase optimizations panic = 'abort' # Abort on panic strip = true # Strip symbols from binary* [lints.rust] missing_docs = "warn" missing_debug_implementations = "deny" unsafe_code = "forbid" unused_import_braces = "warn" [lints.clippy] unwrap_used = "deny" missing_errors_doc = "deny" missing_panics_doc = "deny" missing_safety_doc = "deny" perf = { level = "warn", priority = -1 } arithmetic_side_effects = "warn" cargo_common_metadata = "warn" todo = "warn" enum_variant_names = "allow" missing_const_for_fn = "warn" missing_docs_in_private_items = "warn" allow_attributes_without_reason = "warn" dbg_macro = "warn" indexing_slicing = "deny" unit_arg = "allow" match_like_matches_macro = "allow" module_inception = "allow"