1 // Copyright 2023 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #[cfg(any(target_os = "android", target_os = "linux"))] 6 pub mod linux; 7 8 #[cfg(any(target_os = "fuchsia", target_os = "macos", target_os = "nto"))] 9 pub mod stub; 10 11 #[cfg(windows)] 12 pub mod windows; 13 14 cfg_if::cfg_if! { 15 if #[cfg(any(target_os = "android", target_os = "linux"))] { 16 pub use linux as platform; 17 } else if #[cfg(windows)] { 18 pub use windows as platform; 19 } else if #[cfg(any(target_os = "fuchsia", target_os = "macos", target_os = "nto"))] { 20 pub use stub as platform; 21 } else { 22 compile_error!("Unsupported platform"); 23 } 24 } 25