Skip to content

Commit

Permalink
invert the main loop. simplify things
Browse files Browse the repository at this point in the history
  • Loading branch information
museun committed Aug 16, 2020
1 parent f4fab84 commit b5a0695
Show file tree
Hide file tree
Showing 133 changed files with 1,016 additions and 2,689 deletions.
85 changes: 80 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,80 @@
[workspace]
members = [
"simple_event_map",
"twitchchat"
]
[package]
name = "twitchchat"
edition = "2018"
version = "0.11.8"
authors = ["museun <museun@outlook.com>"]
keywords = ["twitch", "irc", "async", "asynchronous", "tokio"]
license = "MIT OR Apache-2.0"
readme = "README.md"
description = "interface to the irc-side of twitch's chat system"
documentation = "https://docs.rs/twitchchat/latest/twitchchat/"
repository = "https://github.com/museun/twitchchat"
categories = ["asynchronous", "network-programming", "parser-implementations"]

[package.metadata.docs.rs]
features = ["default"]
rustdoc-args = ["--cfg", "docsrs"]

[features]

[dependencies]
# logging support
log = "0.4.11"

# just the futures traits
futures-lite = "0.1.11"

# field pin projection
pin-project-lite = "0.1.7"

# cloneable async writes
async-dup = "1.2.1"

# message passing
async-channel = "1.4.0"

# for timing out futures
futures-timer = "3.0.2"

# for 'fairness' in the main loop
fastrand = "1.3.4"

# serializion/deserializion support
serde = { version = "1.0.115", optional = true, features = ["derive"] }

# optional runtimes (for TcpStream)
# these use the futures AsyncWrite+AsyncRead
async-io = { version = "0.1.11", optional = true }
smol = { version = "0.3.3", optional = true }
async-tls = { version = "0.9.0", default-features = false, features = ["client"], optional = true }
# TODO look into what their features do. the ones they have enabled by default seem important
async-std = { version = "1.6.3", optional = true }

# tokio has its own AsyncWrite+AsyncRead
tokio = { version = "0.2.22", features = ["net"], optional = true }
tokio-util = { version = "0.3.1", features = ["compat"], optional = true }
tokio-rustls = { version = "0.14.0", optional = true }
webpki-roots = { version = "0.20.0", optional = true }

[dev-dependencies]
doc-comment = "0.3.3"
serde_json = "1.0.57"
async-io = "0.1.11"
alto_logger = "0.3.6"
async-executor = "0.1.2"
anyhow = "*"

[[example]]
name = "message_parse"

[[example]]
name = "smol_demo"
required-features = ["smol"]

[[example]]
name = "async_std_demo"
required-features = ["async-std", "async-std/attributes"]

[[example]]
name = "tokio_demo"
required-features = ["tokio/full", "tokio-util"]
42 changes: 0 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1 @@
# twitchchat
[![Documentation][twitchchat_docs_badge]][twitchchat_docs]
[![Crates][twitchchat_crates_badge]][twitchchat_crates]
[![Actions][actions_badge]][actions]

This crate provides a way to interact with [Twitch]'s chat.

Along with parse messages as Rust types, it provides methods for sending messages.

See its [README](twitchchat/README.md)

# simple_event_map
[![Documentation][sem_docs_badge]][sem_docs]
[![Crates][sem_crates_badge]][sem_crates]
[![Actions][actions_badge]][actions]

This crate provides a simple event mapping which provides listeners as a blocking iterator or an asynchronous stream.

This primarily used in twitchchat, but included in the workspace so things are updated together

See its [README](simple_event_map/README.md)

# License for all crate
`twitchchat` and `simple_event_map` are primarily distributed under the terms of both the **MIT license** and the **Apache License (Version 2.0)**.

See [LICENSE-APACHE][APACHE] and [LICENSE-MIT][MIT] for details.

[actions_badge]: https://github.com/museun/twitchchat/workflows/Rust/badge.svg
[actions]: https://github.com/museun/twitchchat/actions

[twitchchat_docs_badge]: https://docs.rs/twitchchat/badge.svg
[twitchchat_docs]: https://docs.rs/twitchchat
[twitchchat_crates_badge]: https://img.shields.io/crates/v/twitchchat.svg
[twitchchat_crates]: https://crates.io/crates/twitchchat

[sem_docs_badge]: https://docs.rs/simple_event_map/badge.svg
[sem_docs]: https://docs.rs/simple_event_map
[sem_crates_badge]: https://img.shields.io/crates/v/simple_event_map.svg
[sem_crates]: https://crates.io/crates/simple_event_map

[APACHE]: ./LICENSE-APACHE
[MIT]: ./LICENSE-MIT
[Twitch]: https://dev.twitch.tv
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions simple_event_map/Cargo.toml

This file was deleted.

201 changes: 0 additions & 201 deletions simple_event_map/LICENSE-APACHE

This file was deleted.

23 changes: 0 additions & 23 deletions simple_event_map/LICENSE-MIT

This file was deleted.

Loading

0 comments on commit b5a0695

Please sign in to comment.