Running Rust app without showing the terminal

I've a rust app that is using web-view as GUI.
Upon clicking the .exe file in Windows, the terminal is opened showing the full path of the application opened, and be terminated by pressing Ctrl+C, as well as opening the webview that is showing the GUI.

How can avoid getting the terminal opened, and see only the webview one

I aware if this is a service, I can avoid it by setting app win-service, but my case is different, Thanks

Try adding this crate attribute to

#![windows_subsystem = "windows"]

Perfect, thanks a lot, it got things done, what about other system, Mac and *-ix, just to know.

1 Like

As I understand it, this behavior is unique to Windows. Neither Mac nor Linux has a built-in setting for automatically starting a terminal when running a program. I don't know about other *-ix operating systems, but I expect they're the same as Linux.


Yeah, it's unique to Windows. IIUC "bad defaults" (for modern software) like this are typical on Windows precisely because Windows tries super hard to be backwards compatible with all software ever written even back in the DOS days. Being the most popular desktop OS is a double-edged sword.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.