Commit log

425be4b tokio-xmpp: Improve highlight_xml()

Click to expand commit body
First switch to LazyLock from OnceLock, to simplify the code.

Then concatenate the colour reset escape code instead of using
format!(), since the vast majority of those strings have more capacity
than their length it will avoid a reallocation in most cases.

Emmanuel Gil Peyrot created

263839a xmlstream: add tests to capture thingy

Click to expand commit body
This would've caught the embarrassing error made in the previous commit.

Jonas Schäfer created

c795921 xmlstream: fix crash

Click to expand commit body
This happened when (a bit too hastily) applying suggestions from a
review.

Jonas Schäfer created

bfe723c parsers: make stream errors more ergonomic for error processing

Jonas Schäfer created

b39ad99 parsers: add stream error XSO

Jonas Schäfer created

ce4b739 xmlstream: allow simplex stream shutdown

Click to expand commit body
Unlike poll_close, poll_shutdown will only kill the sending side of the
stream. This is relevant to perform a fully clean shutdown procedure in
XMPP.

Jonas Schäfer created

4cfe4f8 xmlstream: implement simple timeout logic

Click to expand commit body
This allows to detect and handle dying streams without getting stuck
forever.

Timeouts are always wrong, though, so we put the burden of choosing the
right values (mostly) on the creator of a stream.

Jonas Schäfer created

960fd78 xmlstream: fix clean shutdown sequence

Click to expand commit body
Without the early return in XmlStream::poll_next in case of the stream
footer, the read state gets recreated and the logic at the top of that
function to actually handle stream shutdown gracefully is never
triggered.

Also that logic was incorrect; the correct behaviour is to wait for the
true EOF.

Jonas Schäfer created

efc859a xmlstream: re-introduce syntax-highlit logging of XML stream I/O

Jonas Schäfer created

c01eb09 xso-proc: improve error messages on cast mismatch for extracts

Click to expand commit body
The old error message was pointing at the `FromXml` / `AsXml` invocation
and not on the field which actually caused the problem. The new error
message points exactly at the type of the affected field.

Jonas Schäfer created

51884ee Fix missing copyright header

Jonas Schäfer created

c85c98b xmlstream: improve responder-side of stream resets

Click to expand commit body
This makes the stream resets a lot safer, by preventing the forbidden
send-read-reset combination of events: the reset function on the
responder side now takes the element to send right before the reset,
enforcing a send-reset pattern.

Jonas Schäfer created

ab10e30 Port crates to use new XSO-based xmlstream

Jonas Schäfer created

7cfda82 xmlstream: introduce XMPP specifics

Jonas Schäfer created

2c944eb xmlstream: add access to inner stream

Jonas Schäfer created

2931df2 xmlstream: split initiation reset in two phases

Jonas Schäfer created

c723897 tokio_xmpp: introduce xmlstream module

Click to expand commit body
This module provides XSO-based parsing, proper typestates and will
soon replace the proto module.

Jonas Schäfer created

274baae add support for local trust store for rustls

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

schnell created

f77c21f Update to rxml 0.12.0

Jonas Schäfer created

cc3400b Reorganize component modules

xmppftw created

e6863bd Reorganized client modules

xmppftw created

46dc30c Deny doc warnings in Gitlab CI

Click to expand commit body
Github/Gitea/Forgejo CI not affected because it doesnt build docs yet

xmppftw created

df106df Relative dependencies

xmppftw created

54e1a98 parsers: add starttls XSOs

Jonas Schäfer created

3c78310 parsers: add umbrella enum for SASL elements

Click to expand commit body
This is useful if, for example during stream negotiation, you want to
parse SASL elements and nothing else. It is also useful if you want to
write down an enum of all XMPP-related stream-level elements you accept
and don't want to loose your fingers typing all the SASL options.

Jonas Schäfer created

fc68a57 parsers: provide stub FromXml/AsXml implementations on Presence

Jonas Schäfer created

b931af3 parsers: provide stub FromXml/AsXml implementations on Iq

Jonas Schäfer created

5c990a5 xso: enable rxml macros when enabling xso_proc

Click to expand commit body
We build syn then anyway, so we can build rxml macros, too.

Jonas Schäfer created

6b48868 xso: offer `is_xml_whitespace` function

Jonas Schäfer created

c63b554 Fix broken link

xmppftw created

38baf53 Absolute document link

xmppftw created

e153468 Link is link, remove doc warning

xmppftw created

cbc4648 parsers: port SASL over to derive macros

Click to expand commit body
You may note that I removed the `exhaustive` flag on the
DefinedCondition enum. This is because other elements in the same
namespace may occur as siblings of that enum, hence using `exhaustive`
may cause incorrect parse errors.

(If parsing attempts to process the `<text/>` child as DefinedCondition
first, DefinedCondition will return a fatal parser error if it is set as
exhaustive because no condition matches `text`.)

Jonas Schäfer created

1ecb958 xso: add support for extracting tuples

Jonas Schäfer created

ad2c79c xso: document some specific trait implementations

Jonas Schäfer created

2ff81b3 xso: add support for fallible parsing and serialisation

Jonas Schäfer created

02a928a xso: add some tests

Jonas Schäfer created

f1ab857 xso: move helper iterators and builders into separate module

Click to expand commit body
This declutters the main `xso` namespace. In addition, if (when) we
introduce more complex generic implementations, we might want to have
tests for these, and those can then live there, too, without making the
main `lib.rs` file gigantic (or moving the tests too far away from the
tested code).

Jonas Schäfer created

9f4af16 Component is now behind insecure-tcp feature flag

xmppftw created

16a78d3 More documentation for tokio_xmpp

xmppftw created

0b58561 Rename AsyncClient to Client

xmppftw created

311e740 Make Client and Component more unified, and connectors too

xmppftw created

fde4c2b Move XmppCodec and XmppStream to proto module

xmppftw created

ec3c769 Moved starttls connector to tokio_xmpp::connect::starttls module

xmppftw created

9151461 TCP connector is now in connect module

xmppftw created

a3fbd77 Remove tokio_xmpp::SimpleClient

xmppftw created

97698b4 Add `dns` feature for DNS stuff (not just in starttls)

xmppftw created

d706b31 xmpp-parsers: Remove the generate_element!() macro

Click to expand commit body
The last users have now been converted to xso.

Emmanuel Gil Peyrot created

4f81411 xmpp-parsers: Convert Jingle to xso

Emmanuel Gil Peyrot created

cb2c413 xmpp-parsers: Convert Forwarded to xso

Emmanuel Gil Peyrot created