# big-haptic-driver

Initial OpenVR driver scaffold in Rust.

## Current capabilities

- Exports `HmdDriverFactory` with minimal interface-name validation
- Exposes DLL-callable haptics test exports:
  - `BigHapticDriver_SendAmplitude(float)`
  - `BigHapticDriver_Stop()`
- Sends packets to firmware through shared `hid-bridge`

## Build

From workspace root:

- `cargo build -p big-haptic-driver --release`

Output DLL path:

- `target/release/big_haptic_driver.dll`

## Build + deploy (one command)

From workspace root:

- `./tools/scripts/build_and_deploy_openvr_driver.ps1`

This builds the crate and copies the DLL to:

- `openvr-driver/big-haptic-driver/bin/win64/driver_big_haptic_driver.dll`

## SteamVR layout

Driver folder should include:

- `driver.vrdrivermanifest`
- `resources/`
- `resources/input/big_haptic_profile.json`
- `resources/localization/en_us.json`
- `bin/win64/driver_big_haptic_driver.dll`

## Register with SteamVR

Typical command:

- `vrpathreg.exe adddriver <path-to-openvr-driver/big-haptic-driver>`

## Next implementation step

Implement concrete C++ ABI-compatible vtables for:

- `IServerTrackedDeviceProvider`
- `ITrackedDeviceServerDriver`

and route `TriggerHapticVibration` events to `BigHapticDriver_SendAmplitude` logic.
