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 target_os = "motor" => {
43 mod motor;
44 pub use motor::*;
45 }
46 _ => {
47 mod unsupported;
48 pub use unsupported::*;
49 }
50 }
51}
52
53mod kernel_copy;
54
55pub use io_slice::{IoSlice, IoSliceMut};
56pub use is_terminal::is_terminal;
57pub use kernel_copy::{CopyState, kernel_copy};
58
59pub const DEFAULT_BUF_SIZE: usize = if cfg!(target_os = "espidf") { 512 } else { 8 * 1024 };