GUI with sciter (terminal not welcome)


I am currently trying to build a GUI app with sciter and noticed that the executable will always open a CLI as well. First I though that must be something with sciter. Now I think that’s just how rust starts the application. So, I tried to create and open a window within a thread but that blocks the main() as well until the tread is finished. I could not find a current example about how to detach the thread and thus the CLI remains open. I would like to get an executable that does not open a CLI. How can I do that?


  • I’m doing this on windows
  • I don’t think it’s a sciter specific problem but if that’s the case I use sciter for the GUI

What is the proper way of building a GUI app that does not open a CLI (or terminal if on linux)?


HI, I use

cargo rustc --release -- -C link-args=-mwindows

I think that is correct, and I have not hit trouble with it. But am always open to better ways of doing things.


Just tried it and it works great. Thanks!

I would also like to know how you found the information. I have been searching for a while without success. I would like to know how to learn these things without having to bother you guys on the forum every time. I find it quite hard to get information about rust.


It is hard to find info on rust. Helpful googleable answers form like sedimentary rock, slowly over long time periods one grain at a time. Hopefully this is another googleable place for people to find this answer.

I found it in a comment to a blog post. (The post had a ridiculous workaround.) I find the IRC relay helpful when my question is too small for the forums.


I see. The price of a young language. Anyway, Thanks for your help.


Just came across this again. That command line only works on gnu versions of the compiler (not msvc).

The new #![windows_subsystem = "windows"] syntax works on both but is unstable. It will be stable in 1.18.


Good to know, thanks for the update.