fastxml 0.8.1

A fast, memory-efficient XML library with XPath and XSD validation support
Documentation
[package]
name = "fastxml"
version = "0.8.1"
edition = "2024"
description = "A fast, memory-efficient XML library with XPath and XSD validation support"
license = "MIT OR Apache-2.0"
keywords = ["xml", "xpath", "xsd", "streaming", "parser"]
categories = ["parser-implementations", "encoding"]
repository = "https://github.com/reearth/fastxml"
homepage = "https://github.com/reearth/fastxml"
documentation = "https://docs.rs/fastxml"

[dependencies]
# XML parsing
quick-xml = { version = "0.37", features = ["serialize"] }

# Error handling
thiserror = "2"

# Thread safety
parking_lot = "0.12"

# Concurrent collections
dashmap = "6"

# Ordered map for schema
indexmap = "2"

# Stack-based small vectors
smallvec = "1"

# Inline small strings (avoids heap allocation for short strings)
compact_str = "0.8"

# Hashing
xxhash-rust = { version = "0.8", features = ["xxh64"] }

# Temp file/directory management
tempfile = "3"

# Regular expressions (for XSD pattern facet validation)
regex = "1"

# URL parsing
url = "2"

# HTTP clients (optional)
ureq = { version = "2", optional = true }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"], optional = true }

# Async runtime (optional, for tokio::fs)
tokio = { version = "1", features = ["fs"], optional = true }

# Async support (optional)
async-trait = { version = "0.1", optional = true }

# Logging/tracing
tracing = "0.1"

# Memory profiling (optional)
memory-stats = { version = "1", optional = true }

# CLI support (optional)
clap = { version = "4", features = ["derive"], optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
flate2 = { version = "1", optional = true }

# libxml for comparison testing (optional, requires libxml2 system library)
libxml = { version = "0.3", optional = true }

[dev-dependencies]
criterion = "0.5"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
tokio-test = "0.4"
tempfile = "3"
serde_json = "1"
ureq = "2"
flate2 = "1"
clap = { version = "4", features = ["derive"] }

[features]
default = []

# Async trait support (for custom async fetcher implementations)
async-trait = ["dep:async-trait"]

# HTTP clients
ureq = ["dep:ureq", "dep:clap", "dep:serde", "dep:serde_json", "dep:flate2"]  # Sync HTTP client + CLI support
tokio = ["async-trait", "dep:reqwest", "dep:tokio"]     # Async HTTP/file client (AsyncDefaultFetcher, AsyncFileFetcher, ReqwestFetcher)

# Profiling
profile = ["memory-stats"]

# Comparison testing with libxml (requires libxml2 system library)
compare-libxml = ["dep:libxml"]

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

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

[[example]]
name = "profile_cli"
required-features = ["profile"]

[[example]]
name = "async_schema_resolution"
required-features = ["tokio"]

[[bin]]
name = "fastxml-validate"
path = "src/bin/validate.rs"
required-features = ["ureq"]

[workspace]
members = ["conformance"]