• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2022 The Chromium OS Authors. All rights reserved.
2 // SPDX-License-Identifier: Apache-2.0
3 
4 //! A wrapper module for platform dependent code.
5 
6 cfg_if::cfg_if! {
7     if #[cfg(unix)] {
8         pub mod unix;
9         use unix as platform;
10     } else if #[cfg(windows)] {
11         pub mod windows;
12         use windows as platform;
13     } else {
14         compile_error!("Unsupported platform");
15     }
16 }
17 
18 pub use platform::to_system_stream;
19 pub(crate) use platform::PlatformConnection;
20 pub use platform::SystemStream;
21 
22 #[cfg(test)]
23 pub(crate) mod tests {
24     pub(crate) use super::platform::tests::create_client_server_pair;
25     pub(crate) use super::platform::tests::create_connection_pair;
26     pub(crate) use super::platform::tests::create_pair;
27 }
28