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

feat(mobile): unify build settings and plugin logic for mobile and desktop #17705

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

devxpain
Copy link

@devxpain devxpain commented Feb 6, 2025

  • Changed crate type in examples/mobile/Cargo.toml from staticlib to lib. For iOS, the build_rust_deps.sh script already handles building with cargo rustc --crate-type staticlib, so specifying staticlib in Cargo.toml is unnecessary. For Desktop, setting the crate type to lib in Cargo.toml is required for correct linking and building.
  • Updated examples/mobile/Makefile to call open -a Simulator before xcrun simctl boot, ensuring the Simulator.app launches correctly.
  • Migrated game logic in examples/mobile/src/lib.rs into a public MainPlugin for unified functionality.
  • Added examples/mobile/src/main.rs to demonstrate usage of MainPlugin on both mobile and desktop.
  • Added README.md with build and run instructions for Android, iOS, and Desktop.

…sktop

- Changed crate type in examples/mobile/Cargo.toml from `staticlib` to `lib`.
  For iOS, the `build_rust_deps.sh` script already handles building with `cargo rustc --crate-type staticlib`, so specifying `staticlib` in Cargo.toml is unnecessary.
  For Desktop, setting the crate type to `lib` in Cargo.toml is required for correct linking and building.
- Updated examples/mobile/Makefile to call `open -a Simulator` before `xcrun simctl boot`, ensuring the Simulator.app launches correctly.
- Migrated game logic in examples/mobile/src/lib.rs into a public `MainPlugin` for unified functionality.
- Added examples/mobile/src/main.rs to demonstrate usage of MainPlugin on both mobile and desktop.
- Added README.md with build and run instructions for Android, iOS, and Desktop.
Copy link
Contributor

github-actions bot commented Feb 6, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

- Added documentation to the mobile example's main entry point
- Fixed missing_docs warning by adding an expect attribute to the MainPlugin struct
- Reformatted Android and iOS setup instructions for clarity
- Added whitespace for better readability
- Updated code blocks for consistency
@alice-i-cecile alice-i-cecile added A-App Bevy apps and plugins C-Docs An addition or correction to our documentation O-Android Specific to the Android mobile operating system O-iOS Specific to the iOS mobile operating system C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-App Bevy apps and plugins C-Docs An addition or correction to our documentation C-Usability A targeted quality-of-life change that makes Bevy easier to use O-Android Specific to the Android mobile operating system O-iOS Specific to the iOS mobile operating system S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants