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", target_os = "wasi") => {
6 mod iovec;
7 pub use iovec::*;
8 }
9 target_os = "windows" => {
10 mod windows;
11 pub use windows::*;
12 }
13 target_os = "uefi" => {
14 mod uefi;
15 pub use uefi::*;
16 }
17 _ => {
18 mod unsupported;
19 pub use unsupported::*;
20 }
21 }
22}
23
24mod is_terminal {
25 cfg_select! {
26 any(target_family = "unix", target_os = "wasi") => {
27 mod isatty;
28 pub use isatty::*;
29 }
30 target_os = "windows" => {
31 mod windows;
32 pub use windows::*;
33 }
34 target_os = "hermit" => {
35 mod hermit;
36 pub use hermit::*;
37 }
38 target_os = "motor" => {
39 mod motor;
40 pub use motor::*;
41 }
42 _ => {
43 mod unsupported;
44 pub use unsupported::*;
45 }
46 }
47}
48
49mod kernel_copy;
50
51pub use io_slice::{IoSlice, IoSliceMut};
52pub use is_terminal::is_terminal;
53pub use kernel_copy::{CopyState, kernel_copy};
54
55pub const DEFAULT_BUF_SIZE: usize = if cfg!(target_os = "espidf") { 512 } else { 8 * 1024 };
58
59pub type RawOsError = cfg_select! {
60 target_os = "uefi" => usize,
61 _ => i32,
62};