xmloxide 0.2.0

A pure Rust reimplementation of libxml2 — memory-safe XML/HTML parsing
Documentation
[package]
name = "xmloxide"
version = "0.2.0"
edition = "2021"
rust-version = "1.81"
license = "MIT"
description = "A pure Rust reimplementation of libxml2 — memory-safe XML/HTML parsing"
repository = "https://github.com/jonwiggins/xmloxide"
homepage = "https://github.com/jonwiggins/xmloxide"
documentation = "https://docs.rs/xmloxide"
readme = "README.md"
keywords = ["xml", "html", "parser", "dom", "xpath"]
categories = ["parser-implementations", "web-programming"]
include = [
    "src/**/*.rs",
    "examples/**/*.rs",
    "examples/**/*.c",
    "benches/**/*.rs",
    "include/*.h",
    "Makefile",
    "Cargo.toml",
    "LICENSE",
    "README.md",
    "!tests/html5lib-tests/**",
]

[features]
default = ["cli"]
cli = ["dep:clap"]
ffi = []
bench-libxml2 = ["dep:libxml"]

[dependencies]
clap = { version = "4", features = ["derive"], optional = true }
encoding_rs = "0.8"
libxml = { version = "0.3", optional = true }

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
pretty_assertions = "1"
serde_json = "1"

[lints.rust]
unsafe_code = "deny"

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
# Allow these pedantic lints with justification
module_name_repetitions = "allow"   # e.g., tree::TreeNode is fine
must_use_candidate = "allow"        # too noisy for builder methods
missing_errors_doc = "allow"        # we document errors but not on every fn
missing_panics_doc = "allow"        # we don't panic in library code anyway
# Deny these — they indicate real bugs
unwrap_used = "warn"
expect_used = "warn"

[lib]
crate-type = ["lib"]

[package.metadata.docs.rs]
features = ["cli", "ffi"]

[[bin]]
name = "xmllint"
path = "src/bin/xmllint.rs"
required-features = ["cli"]

[profile.bench]
lto = "thin"
codegen-units = 1

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

[[bench]]
name = "comparison_bench"
harness = false
required-features = ["bench-libxml2"]