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

cross-platform main function #847

Merged
merged 1 commit into from
Nov 12, 2020
Merged

Conversation

cart
Copy link
Member

@cart cart commented Nov 12, 2020

Android, iOS, and INSERT_FUTURE_PLATFORM_HERE each require different forms of "main function" boilerplate. The newly added #[bevy_main] proc_macro_attribute generates the required boilerplate for android and ios.

This is intended to make cross platform development more standardized / make the same bevy code work on all platforms.

#[bevy_main] is entirely optional. You don't need to include it if you are building for platforms that don't require special boilerplate.

#[bevy_main]
fn main() {
  App::build().run();
}

@simlay @enfipy @PrototypeNM1 @MichaelHills

(i tested this on desktop, android, and web. im testing on ios now)

@cart cart added C-Feature A new feature, making something new possible O-Android Specific to the Android mobile operating system O-iOS Specific to the iOS mobile operating system labels Nov 12, 2020
@cart
Copy link
Member Author

cart commented Nov 12, 2020

Just verified that iOS works too.

@cart cart merged commit 1eff534 into bevyengine:master Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Feature A new feature, making something new possible O-Android Specific to the Android mobile operating system O-iOS Specific to the iOS mobile operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant