xmpp-rs/parsers/Cargo.toml
Jonas Schäfer b8af0d8fa2 xmpp_parsers: --features disable-validation
It was broken in multiple ways:

- xso did not honour it: unknown children and attributes would cause a
  parse error even with `--features disable-validation` set on parsers.
  For this, we introduce a new feature flag on xso, `non-pedantic`,
  which defaults unknown children and attributes to discard instead of
  fail.

  Note that individual XSOs can still choose to be always pedantic or
  always lenient by explicitly declaring the intent via the
  `on_unknown_child` and `on_unknown_attribute` metas.

- Many tests in `xmpp_parsers` were broken with `--features
  disable-validation`. They now all pass while *still* being rn with
  `disable-validation` set: In that case, they test that parsing in fact
  succeeds.
2024-12-20 14:50:14 +01:00

42 lines
1.4 KiB
TOML

[package]
name = "xmpp-parsers"
version = "0.21.0"
authors = [
"Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>",
"Maxime “pep” Buquet <pep@bouah.net>",
]
description = "Collection of parsers and serialisers for XMPP extensions"
homepage = "https://gitlab.com/xmpp-rs/xmpp-rs"
repository = "https://gitlab.com/xmpp-rs/xmpp-rs"
keywords = ["xmpp", "jabber", "xml"]
categories = ["parsing", "network-programming"]
license = "MPL-2.0"
edition = "2021"
[dependencies]
base64 = "0.22"
digest = "0.10"
sha1 = "0.10"
sha2 = "0.10"
sha3 = "0.10"
blake2 = "0.10.4"
chrono = { version = "0.4.5", default-features = false, features = ["std"] }
log = { version = "0.4", optional = true }
# same repository dependencies
jid = { version = "0.11", path = "../jid", features = ["minidom"] }
minidom = { version = "0.16", path = "../minidom" }
xso = { version = "0.1", path = "../xso", features = ["macros", "minidom", "panicking-into-impl", "jid", "uuid", "base64"] }
uuid = { version = "1.9.1", features = ["v4"] }
[features]
# Build xmpp-parsers to make components instead of clients.
component = []
# Disable validation of unknown attributes.
disable-validation = [ "xso/non-pedantic" ]
# Enable serde support in jid crate
serde = [ "jid/serde" ]
# Enable some additional logging in helpers
log = [ "dep:log" ]
[package.metadata.docs.rs]
rustdoc-args = [ "--sort-modules-by-appearance", "-Zunstable-options" ]