#[cfg(not(windows))]
fn main() -> std::io::Result<()> {
let message = "Hello, world!\n";
let mut bytes = message.as_bytes();
let stdout = unsafe { rustix::io::stdout() };
while !bytes.is_empty() {
match rustix::io::write(&stdout, bytes) {
Ok(n) => bytes = &bytes[n..],
Err(rustix::io::Error::INTR) => (),
Err(e) => return Err(e.into()),
}
}
Ok(())
}
#[cfg(windows)]
fn main() {
unimplemented!()
}