Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable the cmd that opens with the app? #1106

Closed
therealmasonmac opened this issue Jul 28, 2020 · 2 comments
Closed

How to disable the cmd that opens with the app? #1106

therealmasonmac opened this issue Jul 28, 2020 · 2 comments

Comments

@therealmasonmac
Copy link

therealmasonmac commented Jul 28, 2020

Platform: 64-bit Windows 10 Home
Code:

use druid::{AppLauncher, WindowDesc, Widget, PlatformError};
use druid::widget::Label;

fn build_ui() -> impl Widget<()> {
    Label::new("Hello, world!")
}

fn main() -> Result<(), PlatformError> {
    AppLauncher::with_window(WindowDesc::new(build_ui)).launch(())?;
    Ok(())
}
@raphlinus
Copy link
Contributor

#![windows_subsystem = "windows"]

rust-lang/rust#40870 has more info.

@therealmasonmac
Copy link
Author

Perfect, it worked. Thanks!

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

No branches or pull requests

2 participants