libraildriver

Crates.iolibraildriver
lib.rslibraildriver
version0.1.3
created_at2019-09-27 19:55:23.591117+00
updated_at2025-08-02 11:23:09.170269+00
descriptionFFI bindings for TSC's RailDriver.dll
homepagehttps://github.com/lilopkins/libraildriver
repositoryhttps://github.com/lilopkins/libraildriver
max_upload_size
id168199
size17,428
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: 0

cargo fmt