[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 }
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
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"]