Commit graph

21 commits

Author SHA1 Message Date
f35bbcb36d minidom: Bump version to 0.16
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 19:02:46 +02:00
86c13611ba Remove unused paths in multiple Cargo.toml
Paths are already patched in the workspace's [patch.crates-io] block.
Not sure why this was added in the first place.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 16:28:38 +00:00
93288307d3
jid: bump version to 0.11
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 18:06:03 +02:00
Emmanuel Gil Peyrot
48f77acb69 jid: Make the crate no_std
Only std::error::Error is missing in this mode, but that’s only waiting
for its stabilisation, see this issue:
https://github.com/rust-lang/rust/issues/103765
2024-05-04 10:28:25 +00:00
xmppftw
ac4ffd2268 Use relative cargo paths when using local copy 2023-12-18 13:06:22 +01:00
4089891f6c Update edition to 2021
- Remove TryFrom/Into and FromIterator imports
- Prevent impl_validator_using_provider macro in sasl crate from
  constructing trait object

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-12-15 19:40:09 +00:00
ec969a78fc
jid: Add optional quote support
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-10-30 14:18:13 +01:00
d0a8ea3178 jid: bump to 0.10
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-08-20 21:34:04 +02:00
e9066c353d
jid: Replace serde_json with serde_test in tests
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-08-14 21:59:09 +02:00
xmppftw
b09c540080 Add tests for serde features of jid crate 2023-08-14 12:17:51 +00: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
Emmanuel Gil Peyrot
cf25bd3fee jid: Refactor all three JID types
The main reason for this refactor was to make common operations simpler,
for instance formatting a JID is now a simple clone of a String.

Instead of having three different String for each of node, domain and
resource, we now have a single String with offsets pointing to where the
at and slash are (if they are present).

This also reduces the size of a FullJid from 72 bytes to 32 bytes on
64-bit platforms (less so on 32-bit), and BareJid from 48 bytes to
32 bytes.  Jid is still 40 bytes instead of 32, but that can be improved
in a future version where InnerJid has been inlined into each struct.
2023-06-20 18:59:26 +02:00
Emmanuel Gil Peyrot
d867d8d7a1 jid: Replace icu with stringprep
This dependency is unmaintained, but it is written in pure Rust unlike
ICU, and doesn’t require a roundtrip through UTF-16, improving both
performances (perhaps?) and ease of compilation.
2023-06-20 18:59:26 +02:00
a91157aa80
jid: Add feature alias 'stringprep'
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-15 21:44:04 +01:00
Emmanuel Gil Peyrot
6eb25755a3 WIP: Add ICU bindings for stringprep, idna2008 and spoof checker. 2022-09-16 11:10:52 +02:00
Astro
b6618ffa3d jid: Release 0.9.4 2022-07-13 20:50:10 +02:00
Emmanuel Gil Peyrot
10f173db91 jid: Release 0.9.3 2022-03-07 12:12:02 +01:00
Emmanuel Gil Peyrot
e8359cffdc jid, xmpp-parsers: Bump minidom. 2022-02-16 21:11:56 +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/Cargo.toml (Browse further)