iOS support for #[bevy_main]
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
My current cross-platform no_std main function looks like :
```rs
#[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 :
```rs
#[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.
Contributor guide
Assessment
This issue has not been assessed yet.