Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
/ openxrs Public archive
forked from Ralith/openxrs

OpenXR bindings for Rust

Notifications You must be signed in to change notification settings

servo/openxrs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenXRS

Documentation Crates.io License: MIT License: Apache 2.0

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

openxr

The high-level bindings provide abstractions focusing on ergonomics and safety in exchange for minimal overhead. 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. This is useful when the target environment guarantees the presence of an OpenXR implementation at a specific location, making the loader redundant.
  • nalgebra exposes Into and From impls for converting to and from nalgebra types where appropriate.

openxr-sys

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.

Packages

No packages published

Languages

  • Rust 100.0%