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

Replace android-properties with android_system_properties. #2815

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

nical
Copy link
Contributor

@nical nical commented Jun 27, 2022

Fixes #2805.

Description

android-properties use statically linked Android libc symbols while android_system_properties loads them dynamically. This is required to support old and new versions of Android with the same binary. It unblocks updating wgpu in Gecko.

In its current version, android_system_properties supports exactly what wgpu needs and nothing more, which makes it easy to audit, don't hesitate to give it a critical look: https://github.com/nical/android_system_properties/blob/00c55a5a871e3fc6d9b133f96bf6d74c8e1927cf/src/lib.rs and report concerns here or in an issue on the repo.

I heared back from the android-properties crate author yet in my PR their repo and I can't afford to wait for too long as this blocks a lot of work on the Firefox side. So I ended up putting together an alternative crate (the PR was already pretty much an entire rewrite). I'll be happy to move wgpu back to android_properties if/when things can be resolved there (and yank the whole android_system_properties crate.

Testing

I tested it manually on a device, however it is a bit hard to automate. This doesn't change the test coverage as far as wgpu is concerned.

The former use statically linked Android libc symbols while the latter loads them dynamically. This is required to support old and new versions of Android with the same binary. It unblocks updating wgpu in Gecko.

Fixes gfx-rs#2805.
@cwfitzgerald
Copy link
Member

Sounds good, keep us updated when upstream changes!

@cwfitzgerald cwfitzgerald merged commit 892c272 into gfx-rs:master Jun 27, 2022
@nical nical deleted the android-properties branch June 27, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation fails on android 5
2 participants