Commit graph

2,529 commits

Author SHA1 Message Date
Jonas Schäfer
bda08407b0 xmlstream: remove T: AsXml bound from XmlStream type
While the FromXml bound is necessary for the key implementation of the
XmlStream (the `impl Stream`), the AsXml bound is not as intrinsic: the
Sink implementation can take any AsXml implementation on each separate
send invocation.

By removing this bound, we can add extra logic *only* to the parsing,
without having to worry about effects on the sending side.

Concretely, we'll be able to create a wrapper type for XmppStreamElement
which allows us to capture errors during parsing, without having to
worry about what happens during serialisation.
2026-06-06 14:11:55 +02:00
Jonas Schäfer
199218f263 stanzastream: start test suite 2026-06-06 14:04:01 +02:00
Jonas Schäfer
f78ea06bfb parsers: make inner pieces of bind.rs structs accessible 2026-06-06 14:04:01 +02:00
famfo
559159d458 tokio-xmpp: add option to set custom hickory resolver 2026-05-24 20:07:42 +00:00
famfo
8fe026cad3 tokio-xmpp: raise log level of IQ tracker 2026-05-24 17:07:56 +00:00
famfo
366f2c8349 tokio-xmpp: remove redundant pin from examples 2026-05-24 17:07:56 +00:00
famfo
10f1b3663c tokio-xmpp: add option to split client
Adds an option to split the `tokio-xmpp::Client` into a Sender and
Receiver. To enable this, a client worker is added which drives the
stream in the background.
2026-05-24 17:07:56 +00:00
famfo
d84cb261e4 tokio-xmpp: add StreamFeatures to Online event 2026-05-24 17:07:56 +00:00
famfo
8f03661acb tokio-xmpp: split StanzaStream into Sender and Receiver 2026-05-24 17:07:56 +00:00
Link Mauve
58735d6a70 Bump all outdated dependencies
skip-changelog: This isn’t a user-facing change.
2026-05-21 13:26:08 +02:00
famfo
697d4d3bef
tokio-xmpp: update hickory-dns to 0.26 2026-05-21 13:21:46 +02:00
Paul Fariello
3d38a54389 Add XEP-0333 Displayed markers
Add XEP-0333 Displayed markers
2026-05-09 22:08:10 +02:00
Jonas Schäfer
e2dcd8ac66 Stop being pedantic by default
Up to now, the xmpp-rs projects have been very strict about incoming
data. This has served us, as developers of the libraries, well,
uncovering bugs in our and remote implementations which we could then
get fixed.

However, this behaviour is unexpected to users of the library. In the
XMPP world, unexpected child elements and attributes are generally
expected to be ignored. While this could be opted-into previously, the
feature flag for that sounded more dangerous than it was
("disable-validation"). In addition, the tribal knowledge needed to know
about that feature flag may not have reached some people who tried the
library and gave up because of that.

With this change, we make the non-pedantic behaviour the default. For
development and debugging purposes, users can always opt into the
pedantic behaviour as needed, using the newly-introduced `pedantic`
feature flags on all affected crates.
2026-03-27 12:51:51 +01:00
Jonas Schäfer
65c1f5ab10 parsers: fix tests with --features disable-validation and/or component
This disables a bunch of tests when the component feature is disabled,
because that feature changes the namespace of the <message/> element,
which causes the tests to fail.

Thanks to debacle for finding this.
2026-03-03 17:41:27 +01:00
Tobias Deiminger
109356f129 sasl: Support getrandom 0.3 and 0.4
getrandom 0.4.1 was released on 2026-02-03. sasl can use it without code
change.
2026-03-03 13:13:27 +01:00
Link Mauve
a5cb228ee8 jid: Bump to 0.12.2 2026-02-26 17:03:30 +01:00
Link Mauve
09cd01424a jid: Bump to edition 2024 2026-02-26 17:03:30 +01:00
Link Mauve
7f1dc96fac jid: Add support for XEP-0106: JID Escaping
This is used by Slidge, through slixmpp, and could be useful for any
other gateway based on this crate.
2026-02-22 08:38:30 +01:00
Link Mauve
bc88134c41 xmpp-parsers: Make DiscoInfoResult::features a BTreeSet
Features must never be duplicated, so we can use a BTreeSet instead of a
Vec to be nicer for users.

It makes the internal API for computing caps and ecaps2 a bit worse,
because it was expecting a slice directly, so for now let’s collect the
BTreeSet into a Vec when computing the thing.  A refactor to use
Iterator might make it better eventually, but I won’t work on that
before profiling it.
2026-02-21 20:58:33 +01:00
Link Mauve
946d96d7c8 xmpp-parsers: Remove Feature from disco#info
This was just a newtype for a String, but in general using it was harder
than without it.  This simplifies the public API.
2026-02-21 20:19:07 +01:00
Jonas Schäfer
d9f030c07e xso: add support for passing rxml::Options 2026-02-21 13:56:50 +01:00
Jonas Schäfer
bb02836097 Bump rxml to 0.14.0 2026-02-21 13:56:50 +01:00
Link Mauve
954efd2673 xmpp-parsers: Add XEP-0494 (Client Access Management) 2026-02-21 11:50:34 +01:00
Link Mauve
6d18641ace xmpp-parsers: Add support for <bandwidth/> in Jingle RTP Description
This was missing according to the specification, but I have never seen
it used in the wild.
2026-02-21 11:40:46 +01:00
Link Mauve
3107259337 xmpp-parsers: Use #[xml(extract)] for the two values
This simplifies the API, and avoids extra newtypes.
2026-02-21 11:38:01 +01:00
Link Mauve
dbe7925d83 xmpp-parsers: Use #[xml(flag)] for rtcp-mux
Also test that it gets deserialized correctly.
2026-02-21 11:36:35 +01:00
Link Mauve
4d6e1363db xmpp-parsers: Replace bind::Required with an #[xml(flag)]
This makes the code simpler to read.
2026-02-21 11:36:34 +01:00
Link Mauve
ca6e04f931 xmpp-parsers: Simplify StreamFeatures::sasl_mechanisms
This was already just a wrapper around a Vec<String>, but we can do away
with the wrapper thanks to #[xml(extract)].

I’ve also replaced Vec with BTreeSet, since that corresponds better to
how the mechanisms are.
2026-02-21 11:34:05 +01:00
Jonas Schäfer
0c6772aa7d parsers: derive Default for ibr::LegacyQuery
Very useful when composing a query.
2026-02-21 08:49:56 +00:00
Jonas Schäfer
6cc0df47d7 xso: fix build with minidom and without std 2026-02-21 09:36:57 +01:00
Link Mauve
cc3f22d418 xmpp-parsers: Import FromStr from core
This was needlessly imported from std.

skip-changelog: This is no public change whatsoever.
2026-02-18 19:48:49 +00:00
Link Mauve
67ef9654dc xmpp-parsers: Use Borrow and Cow from core and alloc
These were needlessly imported from std.

skip-changelog: This is no public change whatsoever.
2026-02-18 19:48:49 +00:00
Link Mauve
eda94997f0 minidom: Use Borrow and Hash from core
These were needlessly imported from std.

skip-changelog: This is no public change whatsoever.
2026-02-18 19:48:49 +00:00
Link Mauve
4f11d2fe5c xmpp-parsers: Implement XEP-0507: Jingle Content Category
This gives the semantic of each video contents in a Jingle session.
2026-02-18 18:00:20 +00:00
famfo
628c2113d0 tokio-xmpp: add option to disable xmpp_parsers validation 2026-02-18 16:53:38 +00:00
famfo
4316bb02a5 tokio-xmpp: implicitly add bound_jid on received IQs 2026-02-18 17:33:31 +01:00
Jonas Schäfer
a1ade974b0 stanzastream: actually count stanzas in stream management
Looks like a horrible oversight. And this will need tests, but I'm short
on time right now.

Fixes #170.
2026-02-11 10:10:46 +01:00
Jonas Schäfer
3bda04124e tokio-xmpp: publish auth method 2026-02-11 08:23:29 +01:00
pep
65c3e0dee7 xmpp: Remove noisy debug logs
skip-changelog

Signed-off-by: pep <pep@bouah.net>
2026-01-27 21:30:14 +00:00
famfo
f7931e95b6 tokio-xmpp: implicitly add bound_jid to IQs 2026-01-27 21:23:51 +00:00
pep
cff9195d6e
xmpp: Only send RoomSubject with empty body
Signed-off-by: pep <pep@bouah.net>
2026-01-27 22:04:33 +01:00
pep
d910cb9944
tokio-xmpp: Update Changelog for AsRawFd
Signed-off-by: pep <pep@bouah.net>
2026-01-25 16:41:57 +01:00
Alexander Brook Perry
b046d36424 tokio-xmpp: gate AsRawFd behind ktls feature
`AsRawFd` was breaking compilation on Windows.

skip-changelog: ktls support hasn't been released yet

Signed-off-by: pep <pep@bouah.net>
2026-01-25 08:21:39 +00:00
pep
22292c86cc
xmpp: Replace unimplemented! and panic! with info! calls
It's great for debugging for fast-paced implementations but the codebase
has been more or less the same for years now (in a state we don't
exactly like, but it is what it is) and this is hindering things more
than helping.

Keep it at the INFO level nonetheless to make it more or less obvious
these things are not implemented.

Signed-off-by: pep <pep@bouah.net>
2026-01-15 13:19:42 +01:00
Link Mauve
58ed1592f0 xmpp-parsers: Parse the ibr feature in StreamFeatures
This was surprisingly missing before.
2026-01-09 00:49:34 +01:00
Link Mauve
d0062d9931 xmpp-parsers: Split ibr::Query into multiple structs
This introduces FieldsQuery, RemoveQuery, LegacyQuery and FormsQuery,
making this module reflect more accurately how it gets used on XMPP.
2026-01-09 00:49:17 +01:00
pep
f6d4ab9e91 minidom: Bump rxml dep
This should have been done in 19865e5f probably, before the latest
release. This generally causes users of the library to cargo update
manually.

Signed-off-by: pep <pep@bouah.net>
2026-01-08 23:01:58 +00:00
pep
a2ed5026f0 xmpp: Allow resyncs in Agent::join_room
Signed-off-by: pep <pep@bouah.net>
2026-01-04 23:33:08 +01:00
pep
6624dffe25
jid: Allow for deserializers which cannot provide borrowed strings
skip-changelog: already in there.

Signed-off-by: pep <pep@bouah.net>
2026-01-03 21:28:49 +01:00
pep
89feaa0391
jid: Gate struct introduced in 60bf821c6 behind 'serde' feature
skip-changelog: Already updated

Signed-off-by: pep <pep@bouah.net>
2025-12-27 13:32:12 +01:00