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

[Maintenance] Update NDK dependencies #423

Open
2 tasks
kanerogers opened this issue Feb 10, 2023 · 1 comment
Open
2 tasks

[Maintenance] Update NDK dependencies #423

kanerogers opened this issue Feb 10, 2023 · 1 comment
Labels
maintenance A maintenance task!

Comments

@kanerogers
Copy link
Collaborator

kanerogers commented Feb 10, 2023

Background

There's been some activity (pun intended) in the ndk crates. rust-mobile/ndk#372

In short, it looks like:

In addition:

  • oboe now uses ndk 0.7 (which we were previously blocked on)

This is a good thing, as it should hopefully prevent the landmines of having the NDK crates fall out of sync.

So, what we'll need to do is:

  • Bump our cpal dependency to get the newer version of oboe
  • Switch to android-activity
@kanerogers kanerogers self-assigned this Feb 10, 2023
@kanerogers kanerogers changed the title [Maintenance] Bump ndk-glue to 0.7 and upgrade NDK version to 25.1.8937393 [Maintenance] Update NDK dependencies Feb 10, 2023
@kanerogers
Copy link
Collaborator Author

Switching to android-activity seems like a good idea, it'll just take a bit of work. Here's the API for android_activity

use android_activity::AndroidApp;

#[no_mangle]
fn android_main(app: AndroidApp) {
  loop { app.poll_events(..) }
}

This design is a lot cleaner and more - dare I say - it Rusty than ndk-glue as it doesn't require any magic global variables.

However, this would require some updates to Engine as we'd need to pass AndroidApp into it and update its polling logic. Not impossible, but a bit tricky as we'd have to find a way to keep things cross-platform

@kanerogers kanerogers added the maintenance A maintenance task! label Feb 23, 2023
@kanerogers kanerogers removed their assignment Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance A maintenance task!
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant