-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
C-FeatureA new feature, making something new possibleA new feature, making something new possibleS-Needs-TriageThis issue needs to be labelledThis issue needs to be labelled
Description
What problem does this solve or what need does it fill?
My current cross-platform no_std main function looks like :
#[cfg(target_os = "ios")]
extern crate std; // required for mobile_entry_point
#[cfg(target_os = "ios")]
use std::eprintln; // required for mobile_entry_point
#[cfg_attr(target_os = "ios", mobile_entry_point::mobile_entry_point)]
#[cfg_attr(not(target_os = "ios"), bevy_main)]
fn main() {
// ...
}
What solution would you like?
I wish it looked like :
#[bevy_main]
fn main() {
// ...
}
Additional context
I am not sure if it's possible to expand a macro to another macro but if it's the case then this can be improved easily by just adding an ios cfg directive to expand to #[mobile_entry_point]
. Otherwise maybe it's not worth it.
Metadata
Metadata
Assignees
Labels
C-FeatureA new feature, making something new possibleA new feature, making something new possibleS-Needs-TriageThis issue needs to be labelledThis issue needs to be labelled