libraildriver

Crates.iolibraildriver
lib.rslibraildriver
version0.1.2
sourcesrc
created_at2019-09-27 19:55:23.591117
updated_at2022-04-23 21:10:14.896178
descriptionFFI bindings for TS2020's RailDriver.dll
homepagehttps://github.com/Bsalarius/libraildriver
repositoryhttps://github.com/Bsalarius/libraildriver
max_upload_size
id168199
size15,187
Lily Hopkins (lilopkins)

documentation

README

Lib Rail Driver

Rust FFI bindings to the RailDriver.dll library.

These allow you to read and write data to or from Train Simulator 2020. Note that this doesn't work with Train Sim World.

Quick example

extern crate libraildriver;

fn main() {
    let context = libraildriver::Context::new();
    let speed = context.get_value(libraildriver::Value::Speedometer,
                  libraildriver::Kind::Current).expect("Failed to get value.");
    println!("The train's current speed is: {}", speed);
}
Commit count: 3

cargo fmt