linux i use external crate like nix used in unix systems no need this crate in windows
how prevent compile this crate in windows system ?
i import crate like this
#[cfg(not(target_os = "windows"))]
extern crate nix;
but build failed in windows how fix problem ?
Just make it #[cfg(windows)] Also use it over use and mod statements as well.
i think you should specify in your Cargo.toml that nix is only needed for UNIXes as in here: doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies
Обсуждают сегодня