Skip to content

Releases: jprochazk/tmi-rs

0.7.2

15 Aug 11:12
Compare
Choose a tag to compare

Fixed bug where an = in tag value would cause the parser to panic on integer underflow

Full Changelog: 0.7.1...0.7.2

0.7.1

22 Jun 17:37
Compare
Choose a tag to compare

This release include another full rewrite of the tag parser, using a new approach that resulted
in an average 50% performance improvement over version 0.7.0.

# Baseline: f5c6c32da475a7436c0aa58e4f24874364955dcf

# ARM NEON
twitch/1000 
  before: 245.584 µs
  after:  121.391 µs
  change: -49.4%

# x86 AVX512
twitch/1000
  before: 188.064 µs
  after:   94.260 µs
  change: -50.1%

x86 now has implementations using SSE2, AVX2, and AVX512, choosing the best available at compile time.
For that reason, the crate should ideally be compiled with RUSTFLAGS="-C target-cpu=native".

Full commit range: 0.7.0..3b19a23

0.6.0

31 Mar 17:33
Compare
Choose a tag to compare
  • Removed the Channel/ChannelRef
  • Made the oauth: prefix on token in Credentials optional
  • There's only two ways to construct a Client now (instead of 4+)
  • Added into_owned on all typed messages

Removed the Channel/ChannelRef

The # prefix is added if it is not already present, so either client.join("forsen") and client.join("#forsen") is now valid.

Made the oauth: prefix on token in Credentials optional

Previously if you didn't include the prefix, the client would fail to connect with BAD_AUTH. The prefix is now added, so both your_token and oauth:your_token are valid values for token in the Credentials struct.

There's only two ways to construct a Client now (instead of 4+)

  1. Anonymous
let mut client = tmi::Client::anonymous().await?;
  1. Logged in
let credentials = tmi::Credentials::new(login, token);
let mut client = tmi::Client::builder().credentials(credentials).connect().await?;

Timeouts and reconnect backoff are now configured via Client::builder().

Added into_owned on all typed messages

Calling into_owned on a typed message makes it 'static:

match msg.as_typed()? {
  tmi::Message::Privmsg(msg) => channel.send(msg.into_owned());
  // ...
}

Full Changelog: 0.5.0...0.6.0