Skip to content

fix: suppress console window in release builds#18

Merged
realJoshByrnes merged 3 commits into
v2from
copilot/fix-release-build-mode
Mar 7, 2026
Merged

fix: suppress console window in release builds#18
realJoshByrnes merged 3 commits into
v2from
copilot/fix-release-build-mode

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 7, 2026

  • Add #![cfg_attr(all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows")] to src/main.rs to disable the console window in release builds, scoped to Windows targets only
Original prompt

This section details on the original issue you should resolve

<issue_title>Release is compiled in console mode instead of window mode</issue_title>
<issue_description>### Release is compiled in console mode instead of window mode

Description
As pointed out by @jyonxo, The current release build is compiled in console mode rather than window (GUI) mode. As a result, launching the application opens an accompanying console window, which is not expected behaviour for a release build.

Expected behaviour

  • Release builds should be compiled in window/GUI mode
  • No console window should appear when launching the application

Actual behavior

  • Application launches with a visible console window
  • Indicates the binary was compiled with console subsystem enabled

Impact

  • Unintended console window shown to end users
  • Reduces polish and may confuse users in production

Notes

  • Likely related to build configuration (e.g. subsystem setting, linker flags, or entry point)
  • Debug builds may be unaffected / acceptable, but release builds should not use console mode
    ``
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: realJoshByrnes <204185+realJoshByrnes@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix release build to compile in window mode fix: suppress console window in release builds Mar 7, 2026
Comment thread src/main.rs
Co-authored-by: realJoshByrnes <204185+realJoshByrnes@users.noreply.github.com>
@realJoshByrnes realJoshByrnes marked this pull request as ready for review March 7, 2026 05:17
Copilot AI review requested due to automatic review settings March 7, 2026 05:17
@realJoshByrnes realJoshByrnes merged commit 4bc29fd into v2 Mar 7, 2026
3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Rust crate entrypoint to build as a Windows GUI application in release mode, preventing an unwanted console window from appearing when end users launch the app on Windows.

Changes:

  • Add a crate-level cfg_attr to set windows_subsystem = "windows" for Windows non-debug builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@realJoshByrnes realJoshByrnes deleted the copilot/fix-release-build-mode branch March 7, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants