BeastCoding
By Tobias Kriebisch
on

If you've developed a Bevy project in Rust for Windows, you may have noticed that when you run your program, a console window pops up alongside your game window. This can be distracting and unprofessional-looking, and you might prefer to have only the game window display without any extra console window.

Fortunately, there's a simple solution to this issue: using a linker argument when building your project.

To do this, you'll need to open a terminal and navigate to your Bevy project's directory. Then, run the following command:

cargo rustc --release -- -Clink-args="/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup" 

What this command does is add a linker argument to your project, which tells Windows to run your program without creating a console window. The /SUBSYSTEM:WINDOWS argument sets the program to run as a Windows application rather than a console application, and the /ENTRY:mainCRTStartup argument specifies the entry point for your program.

With this command, you can now build your Bevy project for Windows without any distracting console windows popping up. Happy coding!