SVappsLAB.iRacingTelemetrySDK
2.0.0-beta.1
Prefix Reserved
See the version list below for details.
dotnet add package SVappsLAB.iRacingTelemetrySDK --version 2.0.0-beta.1
NuGet\Install-Package SVappsLAB.iRacingTelemetrySDK -Version 2.0.0-beta.1
<PackageReference Include="SVappsLAB.iRacingTelemetrySDK" Version="2.0.0-beta.1" />
<PackageVersion Include="SVappsLAB.iRacingTelemetrySDK" Version="2.0.0-beta.1" />
<PackageReference Include="SVappsLAB.iRacingTelemetrySDK" />
paket add SVappsLAB.iRacingTelemetrySDK --version 2.0.0-beta.1
#r "nuget: SVappsLAB.iRacingTelemetrySDK, 2.0.0-beta.1"
#:package SVappsLAB.iRacingTelemetrySDK@2.0.0-beta.1
#addin nuget:?package=SVappsLAB.iRacingTelemetrySDK&version=2.0.0-beta.1&prerelease
#tool nuget:?package=SVappsLAB.iRacingTelemetrySDK&version=2.0.0-beta.1&prerelease
iRacing Telemetry SDK for C# .NET
High-performance .NET SDK for accessing live telemetry data from iRacing simulator and IBT file playback. Features compile-time code generation for strongly-typed telemetry access with lock-free performance optimizations.
Why Use This SDK?
- Type Safety: Enum-based telemetry variables with IntelliSense/Copilot support and compile-time validation
- High Performance: Processes 600,000+ telemetry records/second with lock-free data streaming architecture
- Background Processing: Dedicated threads for telemetry collection and processing - your app's processing speed never blocks the streaming telemetry data
- Modern Async API: Async data streams with async/await patterns and automatic backpressure handling
- Live Telemetry: Real-time access to speed, RPM, tire data, and 200+ variables during iRacing sessions
- IBT File Support: Cross-platform playback of historical telemetry using the same strongly-typed API
- Robust Buffering: 60-sample ring buffer (1 second at 60Hz) ensures reliable data delivery even when your app can't keep pace
Architecture Benefits
Production-Ready Data Streaming:
- 60-sample ring buffer provides 1 second of buffering at iRacing's 60Hz update rate
- FIFO with drop-oldest strategy automatically handles backpressure when your processing can't keep up
- Never blocks the iRacing data stream - always prioritizes the most recent telemetry
- Prevents memory exhaustion - bounded buffers protect against slow consumer scenarios
- Zero data loss when your app processes faster than 60Hz (~16ms per sample)
This architecture means your dashboard or analysis tool stays responsive and current, even during CPU-intensive operations like rendering charts or writing to disk.
Use Cases
Perfect for building:
- Real-time Dashboards - Display live telemetry on secondary screens
- Data Analysis Tools - Analyze racing performance from IBT files
- Race Engineering Apps - Track tire wear, fuel consumption, lap times
- Telemetry Visualizations - Create charts and graphs from historical data
Support for AI-Assisted Development
Point your AI coding agent to these repository docs:
- SDK usage guide for agents - Recommended usage for consumer applications.
- Advanced SDK reference for agents - Advanced stream, metrics, DI, and troubleshooting patterns.
These files are hosted in the SDK repository and are not copied into consuming projects by the NuGet package.
To have your agent use them automatically, add a line like this to your project's AGENTS.md, CLAUDE.md, or .cursorrules (your agent needs the ability to fetch URLs):
When working with the iRacing Telemetry SDK, read
https://raw.githubusercontent.com/SVappsLAB/iRacingTelemetrySDK/main/docs/ai/SDK_USAGE.md first,
and https://raw.githubusercontent.com/SVappsLAB/iRacingTelemetrySDK/main/docs/ai/SDK_REFERENCE.md for advanced patterns.
Installation
dotnet add package SVappsLAB.iRacingTelemetrySDK
Quick Start
using Microsoft.Extensions.Logging;
using SVappsLAB.iRacingTelemetrySDK;
// 1. Define the telemetry variables you want to track
// Source generator creates strongly-typed TelemetryData struct at compile-time
[RequiredTelemetryVars([TelemetryVar.Speed, TelemetryVar.RPM])]
public class Program
{
public static async Task Main(string[] args)
{
// 2. Create logger
var logger = LoggerFactory.Create(builder => builder.AddConsole())
.CreateLogger("Simple.Program");
// 3. Choose data source
IBTOptions? ibtOptions = null; // null for live telemetry from iRacing
// = new IBTOptions("gt3_spa.ibt"); // IBT file path for playback
// 4. Create telemetry client
await using var client = TelemetryClient<TelemetryData>.Create(logger, ibtOptions);
// 5. Define handlers (what to do with the telemetry data when it arrives)
var handlers = new TelemetryHandlers<TelemetryData>
{
OnTelemetryUpdate = data =>
{
Console.WriteLine($"Speed: {data.Speed?.ToString("F1") ?? "N/A"}, RPM: {data.RPM?.ToString("F0") ?? "N/A"}");
return Task.CompletedTask;
},
OnSessionInfoUpdate = session =>
{
var track = session.WeekendInfo?.TrackDisplayName ?? "unknown";
var drivers = session.DriverInfo?.Drivers?.Count ?? 0;
Console.WriteLine($"Track: {track}, Drivers: {drivers}");
return Task.CompletedTask;
},
OnConnectStateChanged = state =>
{
Console.WriteLine($"Connection state: {state}");
return Task.CompletedTask;
}
};
// Cancellation token to cancel monitoring when needed (e.g. on app shutdown)
using var cts = new CancellationTokenSource();
// 6. Monitor telemetry data stream
await client.Monitor(handlers, cts.Token);
}
}
Requirements
- .NET 8.0+ — the library targets
net8.0and is fully compatible with .NET versions 8, 9 and 10
Documentation & Examples
- Getting Started Guide - Setup and basic usage
- Sample Projects - Basic monitoring, data export, track analysis
- Advanced Usage - Direct stream access, multiple consumers, and cancellation behavior
- Migration Guide - Upgrading from previous versions
- GitHub Repository - Source code and releases
License
Apache License 2.0 - See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- YamlDotNet (>= 17.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 100 | 6/13/2026 |
| 2.0.0-beta.1 | 55 | 6/7/2026 |
| 1.2.1 | 180 | 4/25/2026 |
| 1.2.0 | 1,267 | 3/22/2026 |
| 1.1.1 | 152 | 3/3/2026 |
| 1.1.0 | 152 | 2/16/2026 |
| 1.0.0 | 531 | 11/23/2025 |
| 1.0.0-beta.4 | 248 | 11/10/2025 |
| 1.0.0-beta.3 | 188 | 11/2/2025 |
| 1.0.0-beta.2 | 172 | 10/20/2025 |
| 1.0.0-beta.1 | 167 | 10/13/2025 |
| 1.0.0-alpha.4 | 174 | 9/30/2025 |
| 1.0.0-alpha.3 | 150 | 9/28/2025 |
| 1.0.0-alpha.2 | 167 | 9/26/2025 |
| 1.0.0-alpha.1 | 147 | 9/5/2025 |
| 0.9.8.3 | 247 | 8/1/2025 |
| 0.9.8.1 | 224 | 7/31/2025 |
| 0.9.8 | 191 | 7/27/2025 |
| 0.9.7 | 239 | 7/7/2025 |
| 0.9.6 | 206 | 7/1/2025 |