25 releases (6 breaking)

✓ Uses Rust 2018 edition

new 0.7.2 Feb 15, 2020
0.7.0 Nov 4, 2019
0.5.0 Jul 30, 2019
0.2.2 Mar 25, 2019

#37 in Rendering

Download history 491/week @ 2019-11-01 300/week @ 2019-11-08 451/week @ 2019-11-15 413/week @ 2019-11-22 407/week @ 2019-11-29 828/week @ 2019-12-06 498/week @ 2019-12-13 227/week @ 2019-12-20 153/week @ 2019-12-27 619/week @ 2020-01-03 570/week @ 2020-01-10 448/week @ 2020-01-17 464/week @ 2020-01-24 311/week @ 2020-01-31 411/week @ 2020-02-07

1,997 downloads per month
Used in openxr


16K SLoC

C++ 11K SLoC // 0.1% comments Rust 4K SLoC // 0.0% comments Python 1.5K SLoC // 0.2% comments C 127 SLoC // 0.2% comments PowerShell 24 SLoC


Documentation Crates.io License: MIT License: Apache 2.0

Rust bindings for the OpenXR virtual/augmented reality runtime API. Refer to the specification for detailed documentation on individual API calls.


The high-level bindings provide abstractions focusing on ergonomics and safety. Escape hatches to the raw API are exposed to support unforeseen requirements, and patterns that cannot be efficiently exposed in safe terms are preserved as unsafe.

The crate exposes a number of cargo features:

  • static builds in the Khronos OpenXR loader, which can then be accessed with Entry::linked(). This is the easiest way to get going.
  • loaded allows access to a manually identified OpenXR implementation at run time. This allows for cases where a built-in Khronos loader, normally responsible for that task, cannot be used.
  • linked enables access to an OpenXR implementation linked in by the application. As opposed to static, this is useful when the target environment guarantees the presence of an OpenXR implementation or loader at a specific location, making a built-in loader redundant.
  • nalgebra exposes Into and From impls for converting to and from nalgebra types where appropriate.


The low-level bindings provide faithful unsafe access to the raw API, with ergonomics and type safety improved as much as feasible compared to a bindgen-style binding without reducing expressiveness. For example, symbols are named according to Rust conventions, enums and bitmasks are strongly typed, and many types have helpful Debug impls. This crate is almost entirely generated from the Khronos XML registry.