[package]
name = "fast-unescape"
version = "0.1.0"
edition = "2024"
description = "'unescapes' a escaped string with escape sequences into literal one"
repository = "https://codeberg.org/DM-Earth/fast-unescape"
license = "LGPL-3.0-or-later"
keywords = ["unescape"]
categories = ["text-processing", "parsing", "no-std", "no-std::no-alloc"]

[badges]
maintenance = { status = "actively-developed" }

[dependencies]
memchr = { version = "2.8", default-features = false }

[features]
default = ["std"]
alloc = []
std = [
    "alloc",
    # use more instruction sets
    "memchr/std",
]

[dev-dependencies]
criterion = { version = "0.8", features = ["html_reports"] }
# alternatives
unescaper = "0.1"

[[bench]]
name = "simple_unescape"
harness = false

[[bench]]
name = "zh_literature"
harness = false

[[bench]]
name = "en_literature"
harness = false

[workspace.lints.rust]
missing-docs = "warn"
missing-debug-implementations = "warn"
let-underscore-drop = "warn"
single-use-lifetimes = "warn"
trivial-numeric-casts = "warn"
elided-lifetimes-in-paths = "deny"
unused-lifetimes = "forbid"
unused-macro-rules = "warn"
unused-qualifications = "warn"
variant-size-differences = "warn"
dyn-drop = "forbid"
ellipsis-inclusive-range-patterns = "forbid"
exported-private-dependencies = "forbid"
uncommon-codepoints = "deny"
unexpected_cfgs = { level = "warn", check-cfg = [] }

[workspace.lints.clippy]
missing-panics-doc = "warn"
missing-errors-doc = "warn"
cloned-instead-of-copied = "warn"
future-not-send = "warn"
if-not-else = "warn"
if-then-some-else-none = "warn"
impl-trait-in-params = "warn"
macro-use-imports = "deny"
exhaustive-enums = "warn"
str-to-string = "warn"
iter-without-into-iter = "warn"
decimal-literal-representation = "warn"
ref-as-ptr = "warn"
unused-trait-names = "warn"
unnecessary-semicolon = "warn"
unnecessary-debug-formatting = "warn"
too-long-first-doc-paragraph = "warn"
ref-option = "warn"
redundant-test-prefix = "warn"
map-with-unused-argument-over-ranges = "warn"
manual-midpoint = "warn"
manual-is-power-of-two = "warn"
ip-constant = "warn"
elidable-lifetime-names = "warn"
coerce-container-to-any = "warn"
todo = "warn"
inline-always = "warn"
multiple-crate-versions = "warn"
use-self = "warn"
useless-let-if-seq = "warn"
suboptimal-flops = "warn"
redundant-clone = "warn"

[lints]
workspace = true
