usdpl_core/api_common/
target.rs1pub enum Platform {
3 Any,
5 Decky,
7}
8
9impl Platform {
10 pub fn current() -> Self {
13 #[cfg(all(feature = "decky", not(any(feature = "crankshaft"))))]
14 {
15 Self::Decky
16 }
17 #[cfg(not(any(feature = "decky", feature = "crankshaft")))]
18 {
19 Self::Any
20 }
21 }
22}
23
24impl std::fmt::Display for Platform {
25 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
26 match self {
27 Self::Any => write!(f, "any"),
28 Self::Decky => write!(f, "decky"),
29 }
30 }
31}