Async version of circe using tokio
Go to file
2021-12-31 18:33:17 +01:00
examples Removed unused tokio feature 2021-12-31 18:28:50 +01:00
src Updated docs 2021-12-31 18:33:17 +01:00
.gitignore Inlined 'Cargo.lock' in '.gitignore' 2021-12-06 11:05:35 -06:00
Cargo.toml Removed unused tokio feature 2021-12-31 18:28:50 +01:00
LICENSE Prepare crate for publishing 2021-11-04 12:29:01 -05:00
README.md Final readme fuckup fix 2021-12-28 15:38:22 +01:00

Circe

crates.io Documentation Unlicense

Circe is a an IRC crate built to be as minimal as possible. It's currently work-in-progress, and more stuff is on its way!

Getting started

To start using Circe, just add the crate to your Cargo.toml, and then follow the example below.

use circe::{Client, Config, Command};

fn main() -> Result<(), std::io::Error> {
    let config = Default::default();
    let mut client = Client::new(config).await.unwrap();
    client.identify().await.unwrap();

    loop {
        if let Ok(ref command) = client.read().await {
            if let Command::PRIVMSG(nick, channel, message) = command {
                println!("{} in {}: {}", nick, channel, message);
            }
        }
    }
}

Happy hacking!