19 releases (5 breaking)

Uses old Rust 2015

0.6.2 Jan 24, 2018
0.6.1 Jan 13, 2018
0.5.5 Jan 4, 2018
0.4.0 Dec 27, 2017
0.1.4 Nov 26, 2017
Download history 2/week @ 2021-02-24 4/week @ 2021-03-03 1/week @ 2021-03-10 3/week @ 2021-03-17 61/week @ 2021-03-24 39/week @ 2021-03-31 25/week @ 2021-04-07 27/week @ 2021-04-14 49/week @ 2021-04-21 21/week @ 2021-04-28 1/week @ 2021-05-05 20/week @ 2021-05-12 21/week @ 2021-05-19 2/week @ 2021-05-26 3/week @ 2021-06-02 21/week @ 2021-06-09

97 downloads per month

Custom license

25KB
544 lines

synac-rs Crates.io

A client side library for synac.

Example

extern crate synac;

use synac::{Session, State};

fn main() {
    // TODO: Error checking
    let mut session = Session::new(env!("ADDR"), env!("HASH")).unwrap();
    session.login_with_token(true, env!("USERNAME"), env!("TOKEN")).unwrap(); // true specifies it's a bot account

    // First packet should be either LoginSuccess or an error
    let result = session.read().unwrap();
    // TODO: Use result

    let mut state = State::new();
    loop {
        let packet = session.read().unwrap();
        state.update(&packet);

        // TODO: Use packet
    }
}

Dependencies

~2.2–4MB
~79K SLoC