Skip to content

ts_netmon: only re-export PlatformMon where it exists - #467

Merged
npry merged 1 commit into
mainfrom
npry/netmon.cherry-pick-export-fix
Oct 29, 2026
Merged

npry merged 1 commit into
mainfrom
npry/netmon.cherry-pick-export-fix

Conversation

@npry

@npry npry commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Cherry-pick from comments of #443 -- export fixup for netmon for non-{windows,mac,linux} targets

Updates #443

@npry
npry force-pushed the npry/netmon.cherry-pick-export-fix branch from 89f76f7 to e834f25 Compare October 29, 2026 00:05
PlatformMon is only defined on Linux, macOS and Windows, but lib.rs
re-exported it unconditionally, so ts_netmon (and everything depending
on it) failed to build on other targets such as Android:

    error[E0432]: unresolved import `netmon::PlatformMon`

platform_mon() already returns None on those targets, so gating the
re-export is enough for the runtime to build and run without a
platform network monitor.

Verified with cargo check and clippy for aarch64-linux-android,
x86_64-linux-android and armv7-linux-androideabi.

Signed-off-by: Jesus S Flores <jesus14sf@gmail.com>
@npry
npry force-pushed the npry/netmon.cherry-pick-export-fix branch from e834f25 to 2c67f76 Compare October 29, 2026 00:21
@npry
npry merged commit 2c67f76 into main Oct 29, 2026
23 checks passed
@npry
npry deleted the npry/netmon.cherry-pick-export-fix branch October 29, 2026 14:11
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