Closed
Description
Currently rustc seems to default to the console subsystem on windows (both for gnu and msvc builds). There should be some way to set this in Cargo.toml so that the correct subsystem is used.
Here are the known ways to deal with this currently, all of which suck:
- After cargo builds a console subsystem app, if you want a windows subsystem one, run editbin.exe manually or as part of some higher level build script like mach.
- Override the linker with fake one that runs editbin.exe on the executable and swaps the subsystem. This solution won't work if your link command is not a real compiled executable because the link command line might be too long due to windows command line argument limitations.
- Set RUSTFLAGS="-C link-args=-Wl,--subsystem,windows" or whatever subsystem you want. Unfortunately this causes Cargo to link every executable with the windows subsystem. In particular this means all build scripts get compiled this way which means they pop up console windows constantly during the build process.
Metadata
Metadata
Assignees
Labels
No labels