alwith-api 0.6.1

ALwith from the app side: types of the alwith-runtime-v1 frame protocol, and (feature `client`) a Rust client over a Runtime child's stdio or any byte stream
Documentation
//! Platform details for spawning child processes: no console window pops up on Windows spawn. The
//! client spawning Runtime and modules spawning their own
//! child processes both use it; it is a no-op on non-Windows, so call sites need no
//! `#[cfg(windows)]`.

#[cfg(windows)]
const CREATE_NO_WINDOW: u32 = 0x0800_0000;

pub trait HideConsoleExt {
    fn hide_console(&mut self) -> &mut Self;
}

impl HideConsoleExt for std::process::Command {
    fn hide_console(&mut self) -> &mut Self {
        #[cfg(windows)]
        {
            use std::os::windows::process::CommandExt;
            self.creation_flags(CREATE_NO_WINDOW);
        }
        self
    }
}

impl HideConsoleExt for tokio::process::Command {
    fn hide_console(&mut self) -> &mut Self {
        #[cfg(windows)]
        {
            self.creation_flags(CREATE_NO_WINDOW);
        }
        self
    }
}