1#![forbid(unsafe_op_in_unsafe_fn)]
2
3mod io_slice {
4 cfg_select! {
5 any(target_family = "unix", target_os = "hermit", target_os = "solid_asp3", target_os = "trusty") => {
6 mod iovec;
7 pub use iovec::*;
8 }
9 target_os = "windows" => {
10 mod windows;
11 pub use windows::*;
12 }
13 target_os = "wasi" => {
14 mod wasi;
15 pub use wasi::*;
16 }
17 target_os = "uefi" => {
18 mod uefi;
19 pub use uefi::*;
20 }
21 _ => {
22 mod unsupported;
23 pub use unsupported::*;
24 }
25 }
26}
27
28mod is_terminal {
29 cfg_select! {
30 any(target_family = "unix", target_os = "wasi") => {
31 mod isatty;
32 pub use isatty::*;
33 }
34 target_os = "windows" => {
35 mod windows;
36 pub use windows::*;
37 }
38 target_os = "hermit" => {
39 mod hermit;
40 pub use hermit::*;
41 }
42 _ => {
43 mod unsupported;
44 pub use unsupported::*;
45 }
46 }
47}
48
49pub use io_slice::{IoSlice, IoSliceMut};
50pub use is_terminal::is_terminal;
51
52pub const DEFAULT_BUF_SIZE: usize = if cfg!(target_os = "espidf") { 512 } else { 8 * 1024 };