Expand description
Safe application framework for SCS Telemetry SDK plugins.
This crate owns the parts of an SCS plugin which inherently require unsafe
Rust: exported ABI symbols, raw callback trampolines, stable opaque context
addresses, tagged-union borrowing, lifecycle sequencing, registration
rollback, and panic containment. Application crates implement
TelemetryPlugin and export it with export_plugin! using ordinary safe
Rust only.
§Layering
scs-sdk-sysmirrors the C ABI and header constants;scs-sdksupplies typed descriptors and callback-time borrowed views;- this crate turns those pieces into a safe plugin lifecycle;
scs-sdk-plugin-macrosemits the two symbols discovered by the game.
§Threading model
The official SDK invokes initialization, telemetry callbacks, and shutdown
on the game main thread. The runtime nevertheless serializes its global
state with a mutex so Rust’s process-wide statics remain sound and poisoned
locks can be recovered deterministically. Plugin implementations are
required to be Send because they are stored behind that synchronized
boundary; the framework does not itself move callbacks onto worker threads.
Re-exports§
pub use scs_sdk as sdk;
Macros§
- export_
input_ plugin - Generates the two loader-visible symbols for one SCS input plugin.
- export_
plugin - Generates the two symbols loaded by ETS2 or ATS for one plugin instance.
Structs§
- Channel
Update - One safely borrowed channel callback.
- Configuration
Event - High-level view over one SDK configuration event.
- Game
Compatibility - Minimum telemetry schema required for one supported SCS game.
- Game
Info - Owned identity of the game which loaded the plugin.
- Gameplay
Event - High-level view over one SDK gameplay event.
- Input
Axis Value - A finite normalized value for one float input axis.
- Input
Device Id - Stable identity assigned to one device declared during plugin initialization.
- Input
Device Spec - Explicit declaration of one SCS input device.
- Input
Event - One safe input event to write into the buffer supplied by SCS.
- Input
Event Flags - Flags supplied when SCS requests the next event from a device.
- Input
Event Request - Data supplied each time SCS asks one device for its next event.
- Input
Game Compatibility - Minimum Input API game version required for one recognized game.
- Input
Game Info - Owned identity and input-specific version of the loading game.
- Input
Index - Strong zero-based input index limited by the official per-device maximum.
- Input
Plugin Compatibility - Explicit API and game requirements of one input plugin.
- Input
Plugin Context - Safe capabilities available during one input-plugin hook.
- Input
Spec - One bool or normalized float-axis input exposed by an input device.
- Plugin
Compatibility - Explicit runtime requirements declared by one product plugin.
- Plugin
Context - Safe capabilities available while the framework calls plugin code.
- Plugin
Error - An initialization failure with both an SDK result code and human-readable context suitable for the game log.
- Plugin
Metadata - Static identity reported by the framework during plugin lifecycle logging.
Enums§
- Game
- Recognized games which implement the SCS Telemetry SDK.
- Input
Axis Value Error - Why a raw float could not become a normalized
InputAxisValue. - Input
Device Type - Input-device class declared by the official SDK.
- Input
Value - Safe event value returned by an application input provider.
- Input
Value Type - Value representation accepted for an input-device entry.
- Telemetry
Event - Safe event payload delivered to
TelemetryPlugin::event. - Telemetry
Event Kind - Application-facing name for the canonical
sdk::Eventdescriptor.
Traits§
- Input
Plugin - Application-facing lifecycle for one SCS input plugin.
- Telemetry
Plugin - Application-facing telemetry plugin lifecycle.
Type Aliases§
- Plugin
Result - Result type returned by plugin initialization and subscription helpers.