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

Enable linux_raw support for android #1090

Closed
wants to merge 1 commit into from

Conversation

yujincheng08
Copy link
Contributor

@yujincheng08 yujincheng08 commented Jul 20, 2024

I have no idea why we need use libc backend, but definitely, we should not prevent users from using linux_raw backend.

CI test fails because some constants are missing from libc, and the fix is rust-lang/libc#3779.

@sunfishcode
Copy link
Member

I can't find a link at the moment, but I recall discussions where people believed Android doesn't guarantee raw syscall behavior, and expects users use its libc. Do you know if that's the case?

My other concern here is that we don't currently have any CI testing on Android, so I'm hesitant to enable linux_raw by default without a way of testing it.

@yujincheng08
Copy link
Contributor Author

I don't think that's the way. Android also uses a Linux kernel, and many apps (like Google Chrome) are using raw syscall with libc.

@yujincheng08
Copy link
Contributor Author

For CI, we can use Android emulator for testing (see https://github.com/rust-lang/libc/blob/main/.github/workflows/full_ci.yml)

@notgull
Copy link
Contributor

notgull commented Jul 22, 2024

Is there any significant difference between Linux libc and Android libc?

@yujincheng08
Copy link
Contributor Author

yujincheng08 commented Jul 22, 2024

The libc of Andorid is bonic (a implementation rather than gnu libc, musl, or llvm-libc).

See https://cs.android.com/android/platform/superproject/main/+/main:bionic/

Note that there should not be significant differences in usage level, otherwise ALL libraries have to do special adaptation for Android, which is definitely not something Google wants.

@sunfishcode
Copy link
Member

I will not be able to add Android emulator support to rustix's CI myself, so if this is to happen, someone else will need to to this.

I also don't have confidence in my ability to make an appropriate judgement here, so I've opened #1095 in hopes of receiving more input.

@yujincheng08
Copy link
Contributor Author

Thanks.

@yujincheng08 yujincheng08 deleted the patch-2 branch July 24, 2024 15:33
@yujincheng08
Copy link
Contributor Author

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.

3 participants