#![feature(windows_by_handle)] at the top of the
But my app is supposed to run on Linux and Windows.
#[cfg(target_os = "windows")] #![feature(windows_by_handle)]
It will not gonna work. The aove syntax is not supported.
If I just compile directly on a Linux machine, it will report the error:
$ cargo +nightly b Compiling server-app v0.1.0 (/src/server-app) error[E0635]: unknown feature `windows_by_handle` --> server/src/main.rs:1:12 | 1 | #![feature(windows_by_handle)] | ^^^^^^^^^^^^^^^^^ For more information about this error, try `rustc --explain E0635`. error: could not compile `server-app` (bin "server-app") due to previous error