#dll #tsc #rail-driver

libraildriver

FFI bindings for TSC's RailDriver.dll

4 releases

0.1.3 Aug 2, 2025
0.1.2 Apr 23, 2022
0.1.1 Sep 27, 2019
0.1.0 Sep 27, 2019

#108 in Simulation

Download history 67/week @ 2025-07-27 58/week @ 2025-08-03 3/week @ 2025-08-10 1/week @ 2025-08-17 3/week @ 2025-09-28 2/week @ 2025-10-05

186 downloads per month

MIT license

13KB
145 lines

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);
}

Dependencies

~160KB