lmu-shared-memory 0.1.0

Safe Rust reader for Le Mans Ultimate shared memory telemetry and standings
Documentation
  • Coverage
  • 1.02%
    1 out of 98 items documented1 out of 23 items with examples
  • Size
  • Source code size: 46.0 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 942.6 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • unblvvv/lmu-shared-memory
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • unblvvv

Usage

Enable LMU's Settings > Gameplay > Enable Plugins option and restart the game before connecting.

use lmu_shared_memory::{LmuTelemetry, TelemetryUpdate};

let mut telemetry = LmuTelemetry::connect()?;
match telemetry.read()? {
    TelemetryUpdate::Snapshot(snapshot) => {
        println!("throttle: {:.0}%", snapshot.pedals.throttle * 100.0);
    }
    TelemetryUpdate::NoPlayer | TelemetryUpdate::SourceAlive | TelemetryUpdate::Unchanged => {}
}
# Ok::<(), lmu_shared_memory::Error>(())

Compatibility

The packed offsets are based on LMU's Support\SharedMemoryInterface layout.

License

Licensed under the MIT license.