Crates.io | csgo-gsi2 |
lib.rs | csgo-gsi2 |
version | 0.3.4 |
source | src |
created_at | 2022-09-01 18:16:35.512014 |
updated_at | 2022-10-05 21:26:44.547465 |
description | Rust library for CS:GO's Game State Integration API |
homepage | https://github.com/redsuitman/csgo-gsi2 |
repository | https://github.com/redsuitman/csgo-gsi2 |
max_upload_size | |
id | 656950 |
size | 72,108 |
Helper library for the CS:GO Game State Integration (GSI) API.
Best used with the tokio async ecosystem.
Forked from https://github.com/rosefromthedead/csgo-gsi
Add this to your Cargo.toml
:
[dependencies]
csgo-gsi2 = "0.3.4"
tokio = { version = "1.20.1", features = ["full"] }
examples/simple.rs Can be run with cargo run --example simple
.
use csgo_gsi2::{GSIConfigBuilder, GSIServer, Subscription};
#[tokio::main]
async fn main() {
let config = GSIConfigBuilder::new("csgo-gsi")
.subscribe_multiple(Subscription::UNRESTRICTED)
.build();
let mut server = GSIServer::new(config, 3000);
server.add_listener(|update| println!("Got an update {:#?}", update));
server
.run()
.await
.expect("server didn't start");
}
Check examples/verbose.rs for the verbose example. Can be run with cargo run --example verbose
.
autoinstall
- Automatically install the gamestate_integration_NAME.cfg in the csgo folderLicensed under the Anti-Capitalist Software License version 1.4.
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.