xmpp-rs/xso/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

37 lines
1.2 KiB
TOML

[package]
name = "xso"
version = "0.1.2"
edition = "2021"
description = "XML Streamed Objects: similar to serde, but XML-native."
homepage = "https://xmpp.rs"
repository = "https://gitlab.com/xmpp-rs/xmpp-rs"
keywords = ["xmpp", "xml", "serialization"]
categories = ["encoding"]
license = "MPL-2.0"
[dependencies]
rxml = { version = "0.12.0", default-features = false }
minidom = { version = "0.16", path = "../minidom" }
xso_proc = { version = "0.1", path = "../xso-proc", optional = true }
# optional dependencies to provide text conversion to/from types from/using
# these crates
# NOTE: because we don't have public/private dependencies yet and cargo
# defaults to picking the highest matching version by default, the only
# sensible thing we can do here is to depend on the least version of the most
# recent semver of each crate.
jid = { version = "0.11", path = "../jid", optional = true }
uuid = { version = "1", optional = true }
base64 = { version = "0.22", optional = true }
[features]
default = [ "std" ]
macros = [ "dep:xso_proc", "rxml/macros" ]
minidom = [ "xso_proc/minidom"]
panicking-into-impl = ["xso_proc/panicking-into-impl"]
non-pedantic = []
std = []
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]