client: move #[cfg(feature="mobile")] to #[cfg(mobile)] - #511
Merged
Conversation
|
Code coverage summary for 9d58116: ✅ Region coverage 70% passes |
kp-thomas-yau
left a comment
Contributor
There was a problem hiding this comment.
Btw, the commit message in a66e06a is wrong. We are using cfg_alias to define custom mobile cfg flag. It is not built in Rust at all..... Please update the commit message.
and also I think this PR's scope is broader than it should be, not sure why there's 2 nix-related changes here.
kp-antonio-yang
marked this pull request as draft
August 11, 2026 14:12
kp-antonio-yang
force-pushed
the
no-mobile-feature
branch
from
August 12, 2026 01:07
9223907 to
8b8cfae
Compare
kp-antonio-yang
marked this pull request as ready for review
August 12, 2026 02:05
kp-antonio-yang
marked this pull request as draft
August 13, 2026 01:23
kp-antonio-yang
force-pushed
the
no-mobile-feature
branch
from
August 14, 2026 07:43
5687d07 to
9b458c1
Compare
kp-antonio-yang
marked this pull request as ready for review
August 14, 2026 08:05
7 tasks
kp-antonio-yang
force-pushed
the
no-mobile-feature
branch
from
August 18, 2026 07:58
9b458c1 to
4b2b40b
Compare
kp-antonio-yang
marked this pull request as draft
August 19, 2026 08:51
kp-antonio-yang
force-pushed
the
no-mobile-feature
branch
from
August 19, 2026 08:58
4b2b40b to
074de8d
Compare
kp-antonio-yang
marked this pull request as ready for review
August 19, 2026 09:56
kp-antonio-yang
force-pushed
the
no-mobile-feature
branch
from
August 20, 2026 07:27
074de8d to
7d25563
Compare
…e` cfg predicate By using cfg_alias to provide `mobile` cfg predicate that is automatically set for Android/iOS/tvOS targets. Remove the hand-rolled `mobile` feature and gate platform-specific code on the real cfg instead, so cross-compilation picks up mobile behaviour without explicit `--features=mobile` flags. - Drop the `mobile` feature from Cargo.toml; `mobile-test` now only enables `dep:uniffi` for integration-test scaffolding - Move `tracing-core`/`tracing-panic` from optional to unconditional deps - Gate `uniffi` on target OS in a platform-specific dependency section - Replace `#[cfg(feature = "mobile")]` with `#[cfg(mobile)]` or `#[cfg(any(mobile, feature = "mobile-test"))]` throughout - Update CI and Makefile.toml to drop `--features=mobile` invocations
…ig field sni_header was gated to mobile builds (x-cfg mobile, clap(skip)) and passed as a bare String alongside ConnectionConfig. Move it into ConnectionConfig as Option<String>, wire it through ClientConnectionConfig, and expose it as --sni-header for all targets.
kp-antonio-yang
force-pushed
the
no-mobile-feature
branch
from
August 27, 2026 12:17
7d25563 to
625c4bc
Compare
kp-thomas-yau
approved these changes
Aug 28, 2026
Contributor
Author
|
Thanks for review. |
This was referenced Aug 31, 2026
Merged
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.
Description
This PR bundles related improvements to
lightway-client. We need #508 to let the CI all green to prevent out of disk space issue, so this PR based on top of it.Replace
mobileCargo feature with built-inmobilecfg predicateReplace the hand-rolled
mobileCargo feature flag with Rust's built-inmobilecfg predicate acrosslightway-client.Key mechanical changes:
Cargo.toml: Remove themobilefeature entirely.mobile-testis narrowed to only enablingdep:uniffifor integration-test scaffolding.tracing-coreandtracing-panicbecome unconditional dependencies (lightweight, needed on all targets).uniffimoves to a platform-specific[target.'cfg(any(target_os = "android", target_os = "ios", target_os = "tvos"))'.dependencies]section.src/lib.rs,src/config.rs: All#[cfg(feature = "mobile")]guards replaced with#[cfg(mobile)]or#[cfg(any(mobile, feature = "mobile-test"))]as appropriate.src/io/outside/tcp.rs,udp.rs: fwmark exclusion guard changed fromnot(feature = "mobile")tonot(feature = "mobile-test")to keep firewall marking active on real mobile targets.ci.yaml:--features=mobileremoved from check/clippy/JsonSchema steps; replaced by--libwhere target-based detection is sufficient.Makefile.toml:--features mobiledropped from the Android NDK build task.Motivation and Context
mobilefeature flag was fragile: forgetting to pass it produced a silently incorrect binary (no UniFFI scaffolding, wrong cfg branches). Using the compiler's nativemobilepredicate means the correct code paths are selected automatically based on the actual target triple, with no manual flag required.How Has This Been Tested?
ci.yamlstepsTypes of changes
Checklist:
mainxenon/libxenon-srcis accompanied by a reference to the specific commit in the git changelog