« first day (3474 days earlier)      last day (8 days later) » 

9:57 AM
Why are folks finding this Q so attractive? It fails to recognize the nature of panics as non-recoverable errors.
 
XPD
10:47 AM
dont you love zig?
 
 
2 hours later…
1:00 PM
@XPD Hey there! That is an odd question to ask in a Rust chatroom. :)
 
 
3 hours later…
 
5 hours later…
9:08 PM
Is there a way to specify #[windows_subsystem = "windows"] from Cargo.toml? I feel like such a config setting is a better fit for Cargo.toml than it is for being a random line at the top of main.rs.
And also, is there a way to configure it so it only uses the windows subsystem in release mode?
 
9:56 PM
should work ?
answer is no I think what you want was the alternative but was not selected
 
Alright, I added this to the top of main:
#![cfg(not(debug_assertions))]
#![windows_subsystem = "windows"]
But now I can't compile in debug mode
The error is 'main' function not found in crate '{my_crate_name}'
 
cfg doesn't make sense here
9
A: When I run a certain compiler flag the Rust compiler can't find my main

kmdreko#![cfg(feature = "const_mut_refs")] This does not enable the unstable const_mut_refs compiler feature. The #[cfg] attribute is used for conditional compilation meaning it will disable code where the condition is not met. The ! part means apply the attribute to the current module (in this case, ...

what you want is cfg_attr
 
10:35 PM
@Stargateur Thank you! <3
This worked for me: #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
 
well play
 
11:30 PM
@E_net4 well answer of mat is good at least :p
 

« first day (3474 days earlier)      last day (8 days later) »