No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonas Schäfer 51ce661f8d tokio-xmpp: do not discard XmlLangStack when boxing the stream
The stream may have read some data already (such as the stream
header). When initially writing this code, I had missed that we do
actually also carry the parser state over: I misread the
AsyncReader::wrap(..) command as something like AsyncReader::new, i.e.
starting off with fresh parser state, so I assumed that we need a fresh
XmlLangStack, too.

This is wrong: `p` comes from `self.parser.into_inner()` above and is
the parser state, so we need to carry the lang stack along, as well.

This fixes:

```
thread 'tokio-runtime-worker' panicked at […]/rxml-0.13.1/src/xml_lang.rs:87:13:
pop from empty XmlLangStack
```

happening during stream shutdown. The panic was first reported by
@ppjet6, so thanks for that and the keen eye.

skip-changelog, because the bug has not been released yet.
2025-05-03 17:41:13 +02:00
.forgejo/workflows CI: Ensure treeish string works for main 2024-12-30 21:08:42 +01:00
jid jid: clippy run 2025-04-08 12:47:56 +02:00
minidom minidom: fix build without std 2025-04-27 14:08:38 +02:00
parsers xmpp-parsers: Switch to #[xml(lang)] wherever it’s possible 2025-05-03 10:07:54 +02:00
sasl sasl: Simplify hash conversion to Vec 2024-12-15 17:17:01 +00:00
tokio-xmpp tokio-xmpp: do not discard XmlLangStack when boxing the stream 2025-05-03 17:41:13 +02:00
xmpp xmpp::muc::room: reverse check for rooms_joined 2025-04-27 16:28:02 +02:00
xso xso: provide nicer error messages on missing trait implementations 2025-05-02 17:16:59 +02:00
xso-proc xso-proc: improve spans for error messages 2025-05-02 17:16:59 +02:00
.gitea Support Github Actions (for a migration to forgejo) 2023-12-03 14:20:51 +00:00
.github Deny warnings in github/gitea/forgejo CI and act local runner 2024-01-21 13:55:39 +01:00
.gitignore Hello world! 2019-03-21 18:43:27 +01:00
.gitlab-ci.yml CI: add .show-version block in docs job 2025-04-08 12:43:30 +02:00
Cargo.toml xso-proc: start making derive macros for FromXml and IntoXml 2024-06-23 12:20:02 +02:00
CODE_OF_CONDUCT.md Code of Conduct 2024-01-21 21:50:31 +01:00
CONTRIBUTING.md fix typos 2024-09-16 18:29:44 -03:00
LICENSE Readd global LICENSE file 2020-02-25 22:13:34 +01:00
README.md CONTRIBUTING: Split in categories 2024-02-02 22:26:00 +01:00

xmpp-rs

What's this?

A very much WIP set of rust XMPP library with the goals of being type-safe and well-tested.

  • xmpp-rs provides a high-level API for the protocol. You shouldn't need to know about the protocol to use it.
  • tokio-xmpp is a lower-level library that handles the XMPP stream(s).
  • xmpp-parsers parses XML into Rust and back.
  • minidom is a DOM library quite specific for XMPP
  • jid is a Jid parsing library.

Contact

There is an XMPP MUC for the discussion of this library, feel free to join! :)

chat@xmpp.rs

Community

A Code of Conduct is available as CODE_OF_CONDUCT.md in the repository for the well-being of the community. Please refer to it in case of a possible conflict in any of the xmpp-rs venues (channel, forge, etc.).

License

Mozilla Public License 2 (MPL2). See the LICENSE file.

Building

Dependencies should be provided by crates if you use the default features. If you use tokio-xmpp's tls-native feature you will need an ssl library (openssl, libressl, etc.).

cargo build

The various features available should be explained in the crates themselves.

Contributing

Thank you for your interest in the project!

Contributing rules are available as CONTRIBUTING.md in the repository.