# rust-haptic-driver

Initial OpenVR driver scaffold in Rust.

## Current capabilities

- Exports `HmdDriverFactory` with minimal interface-name validation
- Exposes DLL-callable haptics test exports:
  - `RustHapticDriver_SendAmplitude(float)`
  - `RustHapticDriver_Stop()`
- Sends packets to firmware through shared `hid-bridge`

## Build

From workspace root:

- `cargo build -p rust-haptic-driver --release`

Output DLL path:

- `target/release/rust_haptic_driver.dll`

## SteamVR layout

Driver folder should include:

- `driver.vrdrivermanifest`
- `resources/`
- `bin/win64/driver_rust_haptic_driver.dll`

## Register with SteamVR

Typical command:

- `vrpathreg.exe adddriver <path-to-openvr-driver/rust-haptic-driver>`

## Next implementation step

Implement concrete C++ ABI-compatible vtables for:

- `IServerTrackedDeviceProvider`
- `ITrackedDeviceServerDriver`

and route `TriggerHapticVibration` events to `RustHapticDriver_SendAmplitude` logic.
