Skip to content

Rust FFI bindings to TS2020's RailDriver.dll interface

License

Notifications You must be signed in to change notification settings

lilopkins/libraildriver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rust FFI bindings to TS2020's RailDriver.dll interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages