openvr_sys_bindings

Crates.ioopenvr_sys_bindings
lib.rsopenvr_sys_bindings
version2.0.3
sourcesrc
created_at2023-12-14 15:31:01.697014
updated_at2023-12-14 15:31:01.697014
descriptionRaw unsafe system binding for openvr (updated fork of https://github.com/rust-openvr/rust-openvr-sys)
homepage
repositoryhttps://github.com/Mawco/rust-openvr-sys
max_upload_size
id1069655
size2,477,192
Marco (Mawco)

documentation

README

openvr-sys

Contains function definitions for the OpenVR library. Use the openvr crate, unless you know what you are doing.

Instructions for updating OpenVR

  1. git submodule update --init --recursive (initial checkout only)
  2. git submodule foreach git pull origin master to update the submodule
  3. cargo build --features "buildtime_bindgen" to update the bindings
  4. Apply the workaround for broken OpenVR ABIs, if required

Workaround for broken OpenVR ABIs (Linux/macOS only)

Search for packed structs in headers/openvr.h, i.e., #pragma pack( push, 4 ). Currently, that is:

VRControllerState_t
RenderModel_TextureMap_t
RenderModel_t
VREvent_t

Depending on what bindgen did parse, you have to replace a bunch of #[repr(C)] and #[repr(C, packed(4))] precending those structs in bindings.rs with:

#[repr(C)]
#[cfg_attr(unix, repr(packed(4)))]
Commit count: 23

cargo fmt