Rustix for android, part deux#1577
Open
gurchetansingh wants to merge 4 commits intobytecodealliance:mainfrom
Open
Rustix for android, part deux#1577gurchetansingh wants to merge 4 commits intobytecodealliance:mainfrom
gurchetansingh wants to merge 4 commits intobytecodealliance:mainfrom
Conversation
Contributor
gurchetansingh
commented
Feb 2, 2026
These ioctl wrappers are used by rustix users. For example: https://github.com/Smithay/drm-rs/blob/develop/drm-ffi/src/ioctl.rs#L6 Roughly, they match the ones provided by nix. I'm upstreaming the portion I have personally tested.
Android likes to build host tools (adb, Cuttlefish, ..) via musl, using the same hermetic tree as for Bionic build. And linux-raw-sys isn't in that hermetic tree, so add support for the libc-backend.
It's desirable to enable futex for some cases that will be run on Android. The strategy is just to define the constants needed by the libc ourselves, if libc doesn't provide the necessary constant. Long-term, that could make the libc backend only depend on libc.
Rustix has gone back-and-forth on it's policy on Android. Android platform developers don't want a dependency on linux-raw-sys. This is documented here: bytecodealliance#1095 bytecodealliance#1478 rust-vsock/vsock-rs#60 Android app developers seem to want to use linux-raw-sys though: bytecodealliance#1528 The Android platform developers don't REALLY care about the cargo build though. CI/CD testing on the particular build options Android likes is useful. This MR adds another non-cargo build system (Meson) to the CI/CD, that mirrors the options Android likes. Meson is renowned for being a easy-to-maintain build system. By adding it here, we ensure the continue use of Rustix in core Android platform code.
e97ec4e to
f5b00ae
Compare
Contributor
Author
Contributor
Author
|
Also, getting a new release for this would be most terrific for downstream integrators. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.