webxr/
lib.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5//! This crate defines the Rust implementation of WebXR for various devices.
6
7#[cfg(feature = "glwindow")]
8pub mod glwindow;
9
10#[cfg(feature = "headless")]
11pub mod headless;
12
13#[cfg(feature = "openxr-api")]
14pub mod openxr;
15
16pub mod surfman_layer_manager;
17pub use surfman_layer_manager::{SurfmanGL, SurfmanLayerManager};
18pub type MainThreadRegistry = webxr_api::MainThreadRegistry<surfman_layer_manager::SurfmanGL>;
19pub type Discovery = Box<dyn webxr_api::DiscoveryAPI<SurfmanGL>>;
20
21pub(crate) mod gl_utils;
22
23pub trait WebXrRegistry {
24    /// Register services with a WebXR Registry.
25    fn register(&self, _: &mut MainThreadRegistry) {}
26}