csgo-gsi

Crates.iocsgo-gsi
lib.rscsgo-gsi
version0.3.0
sourcesrc
created_at2020-09-15 19:21:39.266208
updated_at2020-09-21 04:17:02.24133
descriptionrust library for CS:GO's Game State Integration API
homepagehttps://sr.ht/~boringcactus/csgo-gsi/
repositoryhttps://git.sr.ht/~boringcactus/csgo-gsi
max_upload_size
id289136
size98,415
Melody Horn (boringcactus)

documentation

https://docs.rs/csgo-gsi

README

csgo-gsi

builds.sr.ht status Crates.io version Crates.io downloads Crates.io license

Helper library for the CS:GO Game State Integration (GSI) API.

Best used with the tokio async ecosystem.

Usage

Add this to your Cargo.toml:

[dependencies]
csgo-gsi = "0.3.0"

Simple Example

use csgo_gsi::{GSIConfigBuilder, GSIServer, Subscription};

#[tokio::main]
async fn main() {
    let config = GSIConfigBuilder::new("csgo-gsi Example")
        .subscribe_multiple(Subscription::UNRESTRICTED)
        .build();

    let mut server = GSIServer::new(config, 31337);
    server.add_listener(|update| println!("Got an update {:#?}", update));

    server
        .run()
        .await
        .expect("server didn't start");
}

License

Licensed under the Anti-Capitalist Software License version 1.4.

Contribution

Unless you explicitly state otherwise, any contribution you submit shall be also under the Anti-Capitalist Software License version 1.4, without any additional terms or conditions.

History

v0.3.0 - 2020-09-20

  • add optional export into the Rhai scripting language, with the rhai feature

v0.2.0 - 2020-09-20

  • make Update be Clone

v0.1.0 - 2020-09-15

  • Initial release
Commit count: 0

cargo fmt