1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Back-end library for plugins.
//! Targets x86_64 (native Steam Deck ISA).
//!
//! This is a minimalist web server for handling events from the front-end.
//!
#![warn(missing_docs)]

#[cfg(not(any(feature = "decky", feature = "crankshaft")))]
mod api_any;
mod api_common;
#[cfg(all(feature = "crankshaft", not(any(feature = "decky"))))]
mod api_crankshaft;
#[cfg(all(feature = "decky", not(any(feature = "crankshaft"))))]
mod api_decky;

mod callable;
//mod errors;
mod instance;

pub use callable::{Callable, MutCallable, AsyncCallable};
pub(crate) use callable::WrappedCallable;
pub use instance::Instance;
//pub use errors::{ServerError, ServerResult};

/// USDPL backend API.
/// This contains functionality used exclusively by the back-end.
pub mod api {
    #[cfg(not(any(feature = "decky", feature = "crankshaft")))]
    pub use super::api_any::*;
    pub use super::api_common::*;
    #[cfg(all(feature = "crankshaft", not(any(feature = "decky"))))]
    pub use super::api_crankshaft::*;
    #[cfg(all(feature = "decky", not(any(feature = "crankshaft"))))]
    pub use super::api_decky::*;
}

/// usdpl-core re-export
pub mod core {
    pub use usdpl_core::*;
}