Skip to content

Fix compilation on Android#31

Open
mbuesch wants to merge 1 commit into
yaa110:mainfrom
mbuesch:android
Open

Fix compilation on Android#31
mbuesch wants to merge 1 commit into
yaa110:mainfrom
mbuesch:android

Conversation

@mbuesch

@mbuesch mbuesch commented Jun 30, 2025

Copy link
Copy Markdown

This PR extends all target_os conditionals to include the android target.
This enables compilation of the crate on the Android platform (e.g. in termux).

@yaa110

yaa110 commented Jul 16, 2025

Copy link
Copy Markdown
Owner

Hi @mbuesch, thank you for your contribution. On Android, the TUN file descriptor must be provided via VpnService.Builder; otherwise, the device likely needs to be rooted.

@mbuesch

mbuesch commented Jul 17, 2025

Copy link
Copy Markdown
Author

Right. This PR is just supposed to fix the build so that applications can build and don't need to worry about OS at the crate level.
This will probably not make tun work, but the application might be able to do useful things without tun.
Also the app may be able to provide a better message at runtime to the user about failed tun creation.

@yaa110 yaa110 force-pushed the main branch 2 times, most recently from 0f2a36d to bbba061 Compare August 7, 2025 22:29
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.

2 participants