Skip to content

Exclude Linux backend on OHOS#20

Open
FrankHan052176 wants to merge 1 commit into
rustdesk-org:masterfrom
FrankHan052176:ohos/exclude-linux-backend-on-ohos
Open

Exclude Linux backend on OHOS#20
FrankHan052176 wants to merge 1 commit into
rustdesk-org:masterfrom
FrankHan052176:ohos/exclude-linux-backend-on-ohos

Conversation

@FrankHan052176

@FrankHan052176 FrankHan052176 commented Jul 6, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Bug Fixes
    • Improved platform detection so Linux-only features no longer appear on OHOS builds.
    • Tightened availability checks for several desktop features to better match supported platforms.
    • Kept behavior unchanged for standard Linux, Android, and iOS builds.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ae4ec108-5d38-4b6d-bc59-c50e4a02b45a

📥 Commits

Reviewing files that changed from the base of the PR and between 871bf1c and 2e91a16.

📒 Files selected for processing (2)
  • Cargo.toml
  • src/lib.rs

📝 Walkthrough

Walkthrough

Conditional compilation guards in Cargo.toml and src/lib.rs are updated to exclude target_env = "ohos" builds. The Linux dependency table and Linux-specific modules/re-exports now require target_os = "linux" and not ohos; public functions listen, simulate, display_size, and grab exclude ohos alongside android and ios.

Changes

OHOS cfg exclusion

Layer / File(s) Summary
Dependency scoping
Cargo.toml
Linux dependency table cfg condition changed from target_os = "linux" to all(target_os = "linux", not(target_env = "ohos")).
Linux module and re-export gating
src/lib.rs
mod linux; and re-exports for display_size, listen, simulate now require not(target_env = "ohos") alongside target_os = "linux".
Public function cfg guards
src/lib.rs
listen, simulate, display_size, and grab cfg attributes now exclude target_env = "ohos" in addition to android and ios; the Linux-only block after display_size uses the same narrowed condition.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: excluding the Linux backend on OHOS.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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