- Rust 99.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
This was a bit tricky to build, because it is possible to have an indirection through a `static` there. Thanks to Rust's extensive const-fn capabilities, though, it's in fact possible to cover all cases. We still do two different checks to improve user experience. If we can, from within the proc macro, determine that two fields refer to the same XML attribute (because their namespace/name values use the same Rust tokens), then we reject the fields with a clear error message pointing at both fields. In the other case, when there's e.g. `#[xml(lang)]` and `#[xml(attribute(namespace = rxml::XMLNS_XML, name = "lang"))]`, the macro cannot be sure that XMLNS_XML is in fact the XML namespace. For that case, we generate code which is evaluated at compile time (and has no runtime impact) which panics if the namespace and name of two attribute-matching fields is the same. The error message will be less clear (because it contains extra, unchangeable wording like "evaluation of constant value failed" and "the evaluated program panicked at", which may be a bit confusing) than the message generated by the macros themselves, but it's a price we have to pay unfortunately. Note that this check may seem cosmetic and purely for better user experience, but it is in fact needed to avoid generating not-well-formed and/or not-namespace-well-formed XML: As `AsXml` generates `xso::Item`, where each attribute is emitted separated (and not aggregated in a map structure), a naive (and efficient) implementation of a writer might not double-check that no duplicate attributes are generated. |
||
| .forgejo/workflows | ||
| jid | ||
| minidom | ||
| parsers | ||
| sasl | ||
| tokio-xmpp | ||
| xmpp | ||
| xso | ||
| xso-proc | ||
| .gitea | ||
| .github | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
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-rsprovides a high-level API for the protocol. You shouldn't need to know about the protocol to use it.tokio-xmppis a lower-level library that handles the XMPP stream(s).xmpp-parsersparses XML into Rust and back.minidomis a DOM library quite specific for XMPPjidis a Jid parsing library.
Contact
There is an XMPP MUC for the discussion of this library, feel free to join! :)
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.