Commit graph xmpp-rs/jid/CHANGELOG.md
Author SHA1 Message Date
Jonas Schäfer
1710a6f99e Release all crates
Since we tie the versions rather tightly, we have to release the entire
bunch in order to allow people to upgrade to rxml 0.14.
2026-06-11 17:25:32 +02:00
Link Mauve
393feb8d5e jid: Add a failible DomainRef::with_node_str()
This matches BareJid::with_resource_str() in that it allows the user to
parse a &str into a NodePart and construct the BareJid in one call.
2026-06-09 21:44:50 +02:00
Link Mauve
a5cb228ee8 jid: Bump to 0.12.2 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
60bf821c63 jid: Fix JID parts serde deserialization
serde was bypassing the validation these types rely on, making them
completely unsound in an XMPP context.

Fixes #165.
2025-12-25 14:31:23 +01:00
pep
239a019174
jid: Bump to 0.12.1
Signed-off-by: pep <pep@bouah.net>
2025-11-02 01:28:30 +01:00
Maxime “pep” Buquet
b1c80f4071 jid: use "jid" instead of "::jid" in quote support
This causes issues in crates using it because they need to have "jid"
listed as a direct dependency when it's not always obvious (version
mismatch etc. when something already uses jid as a dep)

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2025-09-01 12:38:18 +00:00
Emmanuel Gil Peyrot
cffef5d5f1 jid: Update ChangeLog 2025-02-25 00:00:32 +01:00
Emmanuel Gil Peyrot
2a2f532c80 jid: Validate domains against idna
The idna crate validates against UTS 46, which supports domains using
either IDNA2003 or IDNA2008.  This allows us to support both old and
new internationalized domain names.

This dependency isn’t a new one in the tree, as hickory-proto, url and
tokio-xmpp all were already depending on it.

There are a bunch of other checks that have to be performed, this is
inspired by slixmpp’s JID implementation.
2025-02-12 18:21:20 +01:00
Emmanuel Gil Peyrot
f5f35eab20 jid: Test for too many @ before the resourcepart
This additionally should optimize the parsing a tiny bit by looking for
both @ and / at the same time and iterating on them, instead of one by
one.

Thanks nicoco for the report!
2025-02-12 17:14:04 +00:00
491264fe00 jid: serde support for JID parts 2024-12-20 13:06:05 +00:00
8c033a3fa0 xso: Implement FromXmlText and AsXmlText for NodePart,DomainPart,ResourcePart 2024-12-18 15:43:09 +00:00
Maxime “pep” Buquet
0ef646db86 jid: Bump version to 0.11.1
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 19:02:46 +02:00
Maxime “pep” Buquet
318e5a19cc jid: Update Changelog
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 14:32:13 +02:00
Jonas Schäfer
2c701038cd Implement as_str on all Jid types
This is useful for printing with quotes without copying any data.
2024-03-10 10:51:53 +01:00
Jonas Schäfer
9608b59f60 Add more conversion/construction paths between Jid and part types 2024-03-10 10:51:53 +01:00
Jonas Schäfer
7fce1146e0 Offer {Resource,Node,Domain}Ref on Jid API
This provides a non-copying API, which is generally favourable. The
other accessors were removed, because the intent was to provide this
"most sensible" API via the "default" (i.e. shortest, most concisely
named) functions.
2024-03-10 10:51:01 +01:00
Maxime “pep” Buquet
e20bd9b1d2
jid: Update Changelog
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-11-11 13:24:26 +01:00
Maxime “pep” Buquet
d0a8ea3178 jid: bump to 0.10
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-08-20 21:34:04 +02:00
Maxime “pep” Buquet
63b2e6d176 jid: Update changelog
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-08-20 21:34:04 +02:00
Emmanuel Gil Peyrot
6f304d197d jid: Optimise for no-transform JIDs
stringprep can make transformations to a JID, the most well-known one is
making the nodepart and domainpart lowercase but it does much more than
that.

It is extremely common to have to validate already-normalised JIDs
though, and since https://github.com/sfackler/rust-stringprep/pull/4
this is exactly what the stringprep crate does, by returning
Cow::Borrowed() for common ASCII-only cases.

This commit further reduces time spent by an additional -15%..-58% when
already using this stringprep improvement, in addition to the
89.5%..98.5% change brought by this improvement (and +1.3% total when
the JID isn’t normalised yet).

For instance, my own full JID parses in 1.83 µs before these changes,
132 ns with just the stringprep optimisation, and 46 ns with also this
commit, on an i7-8700K.
2023-07-16 19:50:12 +02:00
76b68e932a Update CHANGELOG for jid crate 2023-06-21 18:41:32 +02:00
2cafecb004 JID stringprep errors return a JidParseError instead of panic (#84) 2023-06-07 17:29:00 +02:00
8d9288ffd7 Implement From<&Jid> for String (close #69) 2023-05-28 22:27:40 +02:00
ce255d9602 Jid (de)serialization now uses untagged representation (close #66) 2023-05-28 19:54:51 +02:00
Emmanuel Gil Peyrot
10f173db91 jid: Release 0.9.3 2022-03-07 12:12:02 +01:00
Emmanuel Gil Peyrot
c94c95de0e jid: Release 0.9.2 2021-01-13 11:46:05 +01:00
Emmanuel Gil Peyrot
3e4b6b55c9 jid: Release 0.9.1 2021-01-13 00:33:26 +01:00
Emmanuel Gil Peyrot
714d850e69 Remove the -rs suffix of jid, minidom and xmpp
We know those are Rust libraries, no need to add it to the path.  This
synchronises their directory with the crate name, hopefully reducing
confusion.
2020-06-22 02:17:32 +02:00
Renamed from jid-rs/CHANGELOG.md (Browse further)