Skip to content

feat(netwatch): support tvOS - #285

Merged
flub merged 4 commits into
n0-computer:mainfrom
andoriyu:netwatch-tvos-support
Nov 30, 2026
Merged

flub merged 4 commits into
n0-computer:mainfrom
andoriyu:netwatch-tvos-support

Conversation

@andoriyu

@andoriyu andoriyu commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

Refs #282

Builds netwatch for tvOS the way iOS is built. tvOS has the same AF_ROUTE routing socket and Darwin APIs, so each gate that names target_os = "ios" (the bsd alias in build.rs, interfaces/bsd.rs, netmon/actor.rs) now names tvOS too. aarch64-apple-tvos and aarch64-apple-tvos-sim join the iOS CI matrix.

Dependency updates:

I also had to fix a few things to get cargo make passing on my Mac. bsd.rs doesn't get compiled on Linux, so CI never caught these: a couple of clippy lints (needless_bool and unused_async) and rustdoc treating <must be specified> as an HTML tag. I left default_route async so it matches the other platforms.

API Changes

None.

Testing

On macOS (aarch64), stable 1.100.1:

  • cargo make: fmt, check, clippy, doc and nextest all pass (32 tests).
  • cargo build --locked --workspace --all-features --target <t> (the CI command) and cargo clippy with no warnings, for aarch64-apple-tvos, aarch64-apple-tvos-sim and aarch64-apple-ios.
  • cargo deny --workspace --all-features check -Dwarnings: advisories, bans, licenses and sources all pass.

With iroh 1.5 and this netwatch, our tvOS app connects and streams on the tvOS simulator. The same change on netwatch 0.19 has shipped in our TestFlight builds.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All API changes documented.
  • cargo make passes locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SnBHbXi2r2EQkp7JSRYvHA

tvOS has the same AF_ROUTE routing socket and Darwin APIs as iOS, but
the bsd cfg alias and every platform gate named only target_os = "ios",
so tvOS got no interface or route-monitor code. Gate tvOS alongside
iOS everywhere.

Needs a netdev release with tvOS support for the full build.
@n0bot n0bot Bot added this to iroh Nov 27, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Nov 27, 2026
@flub

flub commented Nov 27, 2026

Copy link
Copy Markdown
Member

Please do check all the items in the checklist. In particular do run cargo make before making PRs.

@flub flub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the failures.

@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to 🏗 In progress in iroh Nov 27, 2026
@andoriyu
andoriyu marked this pull request as draft November 28, 2026 03:53
@andoriyu

andoriyu commented Nov 28, 2026 via email

Copy link
Copy Markdown
Contributor Author

andoriyu and others added 2 commits November 27, 2026 21:53
netdev 0.48.1 builds on tvOS (shellrow/netdev#201). url 2.5.8 has a
stack overflow in Url::origin() on nested blob: URLs (RUSTSEC-2026-0592),
which fails cargo deny.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SnBHbXi2r2EQkp7JSRYvHA
bsd.rs only builds on Apple and the BSDs, so CI's Linux clippy and doc
jobs don't see it, and cargo make failed on macOS: needless_bool in
is_valid_rib_type, unused_async on default_route (kept async to match
the other platforms), and <must be specified> in the RouteMessage docs
read as HTML tags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SnBHbXi2r2EQkp7JSRYvHA
@andoriyu
andoriyu marked this pull request as ready for review November 28, 2026 06:03
@andoriyu

Copy link
Copy Markdown
Contributor Author

Fixed build issues.

@tc60045

tc60045 commented Nov 28, 2026

Copy link
Copy Markdown

Tested this change (patched onto netwatch 0.20.2) with iroh 1.5 on the tvOS 27 Simulator (aarch64-apple-tvos-sim): builds and works, endpoints connect and stream. The device target (aarch64-apple-tvos) also builds and runs.

@flub flub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! looks good

@flub
flub added this pull request to the merge queue Nov 30, 2026
Merged via the queue into n0-computer:main with commit a421318 Nov 30, 2026
40 checks passed
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to ✅ Done in iroh Nov 30, 2026
@andoriyu
andoriyu deleted the netwatch-tvos-support branch December 1, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants