From 3f8dbb41c01cefd38f3ebb465d87fd08db5f502d Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sun, 4 Oct 2026 02:31:34 -0400 Subject: [PATCH] Windows: the desktop app opens no console window Release builds of lightcraft.exe are GUI-subsystem programs (windows_subsystem = "windows"), so launching the app no longer opens a terminal. Debug builds keep the console; lightcraft-cli.exe stays a console program for terminal use (--help / --version / scripting). Checked with cargo check --release --target x86_64-pc-windows-msvc. Fixes #7 Co-Authored-By: Claude Opus 5.5 --- apps/lightcraft/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/lightcraft/src/main.rs b/apps/lightcraft/src/main.rs index 8a97265d..ce0f7425 100644 --- a/apps/lightcraft/src/main.rs +++ b/apps/lightcraft/src/main.rs @@ -12,6 +12,11 @@ //! `--control ` (or `LIGHTCRAFT_CONTROL_PORT`) starts a localhost JSON-lines control server: //! `{"id":1,"method":"ui.inspect","params":{}}` → `{"id":1,"ok":true,"result":…}`. //! See `lightcraft_ui_egui::control` for the methods. +//! +//! On Windows, release builds are GUI-subsystem programs: launching the app opens no console +//! window (issue #7). Their `--help` / `--version` output and diagnostics then have no console to +//! go to; use `lightcraft-cli` (a console program) from a terminal, or a debug build. +#![cfg_attr(all(target_os = "windows", not(debug_assertions)), windows_subsystem = "windows")] mod alloc_release; mod control_server;