Commit log

a13f050 tokio-xmpp: update dependencies (jid, webpki-roots)

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

Maxime “pep” Buquet created

7f1b98d parsers: Bump to 0.20

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

Maxime “pep” Buquet created

3c10a09 parsers: Update jid dependency

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

Maxime “pep” Buquet created

d44457e parsers: Update changelog

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

Maxime “pep” Buquet created

d0a8ea3 jid: bump to 0.10

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

Maxime “pep” Buquet created

63b2e6d jid: Update changelog

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

Maxime “pep” Buquet created

c6bd897 xmpp: Use correct feature name for hello_bot example

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

Maxime “pep” Buquet created

5c31247 sasl: 0.5.1 release

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

Maxime “pep” Buquet created

75bcd51 sasl: Update LICENSE file to reflect changes for 0.5.0

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

Maxime “pep” Buquet created

0100909 sasl: Update pbkdf2 dep to 0.12

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

Maxime “pep” Buquet created

6efc67a sasl: Update base64 to 0.21

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

Maxime “pep” Buquet created

2e3004f CI: Add a test with no-default-features and ensure it passes

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

Maxime “pep” Buquet created

34467dd sasl: update crate metadata

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

Maxime “pep” Buquet created

ff19e25 Add sasl crate to the workspace

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

Maxime “pep” Buquet created

b81c7e2 Merge remote-tracking branch 'foo/master' into sasl-foo

Maxime “pep” Buquet created

8de1433 jid: Add test for Jid::Full ser/de

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

Maxime “pep” Buquet created

e9066c3 jid: Replace serde_json with serde_test in tests

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

Maxime “pep” Buquet created

2f808f1 chore: Rename User struct to JidContainer

mb created

fc23f98 style: Run cargo fmt

mb created

b09c540 Add tests for serde features of jid crate

xmppftw created

9973039 fix(jid): Fix JID serialization with serde; address oversight in commit cdf4486e

mb created

2ad0dd6 Replace format!("{}", jid) with jid.to_string()

Click to expand commit body
This is more readable I think, and expresses better our intent.

Emmanuel Gil Peyrot created

6fc3a46 jid: Fix tests

Emmanuel Gil Peyrot created

b28c843 xmpp: Use the new FullJid::resource_str() method

Emmanuel Gil Peyrot created

e659576 Use the parts/str split in FullJid and BareJid too

Click to expand commit body
Since 199b3ae7ae12f909b18fca188a121068b340f718 we allow typed parts to
be reused without stringprep being reapplied.  This extends it from just
Jid to FullJid and BareJid too.

Emmanuel Gil Peyrot created

6ccee76 Add a test for an invalid resource

Click to expand commit body
This one uses unassigned codepoints in Unicode 3.2.

Emmanuel Gil Peyrot created

fd26d04 macro `impl_validator_using_provider!`: use `$crate::server::ValidatorError` instead of ValidatorError

Raman Hafiyatulin created

11087d6 Add *Jid::into_inner() returning the inner String

Click to expand commit body
Thanks pep. for the suggestion!

Emmanuel Gil Peyrot created

6f304d1 jid: Optimise for no-transform JIDs

Click to expand commit body
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.

Emmanuel Gil Peyrot created

b3da75d parsers/doap: Add supported platforms

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

Maxime “pep” Buquet created

76b68e9 Update CHANGELOG for jid crate

xmppftw created

4266368 JIDs now have typed and stringy methods for node/domain/resource access

Click to expand commit body
Jid now has typed with_resource and stringy with_resource_str
Jid now has is_full, is_bare

xmppftw created

199b3ae Introduce typed Parts for the JID to enable unfallible JID construction

xmppftw created

85bdcdb tokio-xmpp: Bump idna dependency

Emmanuel Gil Peyrot created

6ccc5cc tokio-xmpp: Poll packets in a loop

Click to expand commit body
This needs to be a loop in order to ignore packets we don’t care about,
or those we want to handle elsewhere.  Returning something isn’t correct
in those two cases because it would signal to tokio that the XMPPStream
is also done, while there could be additional packets waiting for us.

The proper solution is thus a loop which we exit once we have something
to return.

Fixes a deadlock when we ignore some packets.

Emmanuel Gil Peyrot created

ac22765 tokio-xmpp: Remove newline after stream:stream

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

Maxime “pep” Buquet created

e9cbeb1 tokio-xmpp: debug print stream:stream too

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

Maxime “pep” Buquet created

c86f011 jid: Better docs for those types

xmppftw created

5b6dcb6 icu: Remove this obsolete attempt

Emmanuel Gil Peyrot created

cea9c04 xmpp: Update to the new jid crate

Emmanuel Gil Peyrot created

3c9df12 tokio-xmpp: Update to the new jid crate

Click to expand commit body
This helps a bit thanks to fewer clones, but otherwise there are very
few changes.

Emmanuel Gil Peyrot created

c7887ef xmpp-parsers: Fix size tests on 32-bit

Emmanuel Gil Peyrot created

91736ec xmpp-parsers: Fix size tests on 64-bit

Emmanuel Gil Peyrot created

022a920 xmpp-parsers: Update to the new jid crate

Emmanuel Gil Peyrot created

cdf4486 jid: Remove From<*Jid> for String

Click to expand commit body
Use fmt::Display instead if you want this feature.

Emmanuel Gil Peyrot created

ccf41fc jid: Rename errors to make them more consistent

Emmanuel Gil Peyrot created

1904f0a jid: Rename error into Error

Click to expand commit body
JidParseError is an ok name when imported elsewhere, but inside of this
crate it makes much more sense to name it Error.

Emmanuel Gil Peyrot created

2a3d393 jid: Factorize length check for shorter code

xmppftw created

cf25bd3 jid: Refactor all three JID types

Click to expand commit body
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.

Emmanuel Gil Peyrot created

187e156 jid: Move JidParseError into its own module

Emmanuel Gil Peyrot created