6 releases (3 breaking)

Uses old Rust 2015

new 0.7.0 Feb 17, 2025
0.6.0 Jul 10, 2019
0.5.2 Mar 20, 2018
0.5.1 Oct 9, 2017
0.1.1 Apr 19, 2016

#1130 in Hardware support

Download history 27/week @ 2024-10-28 27/week @ 2024-11-04 11/week @ 2024-11-18 15/week @ 2024-11-25 55/week @ 2024-12-02 93/week @ 2024-12-09 38/week @ 2024-12-16 1/week @ 2024-12-23 20/week @ 2024-12-30 37/week @ 2025-01-06 56/week @ 2025-01-13 38/week @ 2025-01-20 14/week @ 2025-01-27 58/week @ 2025-02-03 37/week @ 2025-02-10

156 downloads per month

MIT license

115KB
2K SLoC

rust-openvr

Build Status Join the chat at https://gitter.im/rust-openvr/rust-openvr

High-level bindings for OpenVR.

API documentation

C/C++ API documentation for reference purposes.

Requirements

openvr-sys requires CMake and C++ to compile and statically link the OpenVR library.

Imporant: OpenVR does not support MinGW on Windows, i.e., you have to use the MSVC Rust toolchain and C++ compiler.

Initializing

extern crate openvr;

fn main() {
    // Initialize OpenVR.
    let context = unsafe { openvr::init(openvr::ApplicationType::Scene) }.unwrap();

    // Access subsystem.
    let system = context.system().unwrap();

    // See examples/test.rs for a more detailed example.
}

Dependencies

~0.7–3MB
~63K SLoC