Skip to main content

servo_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 inline;
17
18pub mod surfman_layer_manager;
19pub use surfman_layer_manager::{SurfmanGL, SurfmanLayerManager};
20pub type MainThreadRegistry = webxr_api::MainThreadRegistry<surfman_layer_manager::SurfmanGL>;
21pub type Discovery = Box<dyn webxr_api::DiscoveryAPI<SurfmanGL>>;
22
23pub(crate) mod gl_utils;
24
25pub trait WebXrRegistry {
26    /// Register services with a WebXR Registry.
27    fn register(&self, _registry: &mut MainThreadRegistry) {}
28}