Skip to content

Support Android targets using Linux implementations - #128

Open
dvrdnz wants to merge 1 commit into
NotAShelf:mainfrom
dvrdnz:fix/android-termux-build
Open

dvrdnz wants to merge 1 commit into
NotAShelf:mainfrom
dvrdnz:fix/android-termux-build

Conversation

@dvrdnz

@dvrdnz dvrdnz commented Nov 26, 2026

Copy link
Copy Markdown

Summary

  • Enable existing Linux implementations on Android targets.
  • Fix compilation errors when building Microfetch for Android/Termux.

Motivation

Rust identifies Android targets using target_os = "android" rather than target_os = "linux".

As a result, Linux-specific implementations in microfetch-lib were excluded during Android builds, causing compilation failures.

Changes

Extend the existing Linux cfg conditions to include Android in:

  • cpu.rs
  • release.rs
  • system.rs
  • uptime.rs

No new platform-specific implementations or dependencies are introduced.

Testing

  • cargo check --all-targets on aarch64-linux-android
  • Workspace tests on Termux
  • Runtime verification on Android

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.

1 participant