Repository navigation
fix(netwatch): define Darwin routing constants locally for iOS - #267
Conversation
flub
left a comment
There was a problem hiding this comment.
Thanks for making this PR!
| // the same on all Darwin targets. | ||
| // https://github.com/rust-lang/libc/pull/5158 | ||
|
|
||
| pub const RTF_GATEWAY: c_int = 0x2; |
There was a problem hiding this comment.
Could you make these all pub(crate)? I think that is the eventual visibility? It's easier to see what the visibility is that way rather than having to figure out the visibility of the module.
Would be great to add such a build-only iOS job! Might as well do it right away on this PR so that we know it works. But if you prefer a separate stacked PR would also be fine. |
libc 0.2.190 stopped exposing the net/route.h constants (RTM_*, RTA_*, RTAX_*, RTF_*) on non-macOS Apple targets (rust-lang/libc#5158), which broke building netwatch for iOS. Define them in bsd/macos.rs like the other BSD backends already do, with a macOS test that checks them against libc. Also bump netdev to 0.47, which fixes the same problem on its side, and libc to 0.2.191 in the lockfile so CI builds against the new libc. Fixes n0-computer#261 Co-Authored-By: Claude Opus 5.5 <[email protected]>
6fcea9f to
ef7c6dc
Compare
|
Thanks for the review! Both done:
Also fixed the fmt failure in |
Fixes #23 ## Change - Run the Chromium and Firefox major-release checks on Ubuntu 24.04, which supports the pinned Playwright version. Build the test web app with an offline release-feed fixture. - Backport the Darwin routing fix from [net-tools#267](n0-computer/net-tools#267) to `netwatch` 0.19.3 so it compiles against the current iOS libc bindings. - Pace the WebKit onboarding gestures to match the app's input rate limit and use a standard canvas to generate the test image. ## Validation - [x] `pnpm check:quick` passed with 76 tests and two existing Windows skips. The installed dependencies were used with pnpm's dependency verification set to warn. - [x] The runner regression test failed before the pin and passed afterward. The original onboarding timeout reproduced in Windows WebKit. The updated home-node suite passed using the existing consent fixture to reach onboarding on Windows. - [x] `netwatch` failed to compile for iOS before the backport. The patched crate passed locked checks for both the device and simulator targets. - [x] Rust formatting, `hoi-net` Clippy and focused networking tests, and Cargo license and source checks passed. - [x] The publication check and `git diff --check` passed. The complete iOS build needs Xcode. The full major-release browser matrix still needs GitHub Actions validation. ## Compatibility The lockfiles resolve the existing `netwatch` version to the local backport. There are no protocol or storage format changes.
libc 0.2.190 dropped net/route.h constants on iOS. Carry n0-computer/net-tools#267 until netwatch releases it.
libc 0.2.190 dropped net/route.h constants on iOS. Carry n0-computer/net-tools#267 until netwatch releases it.
Description
Fixes #261.
libc 0.2.190 dropped the
net/route.hconstants (RTM_*,RTA_*,RTAX_*,RTF_*) on non-macOS Apple targets (rust-lang/libc#5158), so netwatch no longer builds foraarch64-apple-ios. This defines them ininterfaces/bsd/macos.rs, the same way the FreeBSD/NetBSD/OpenBSD backends already do, and adds a macOS-only test that checks them against libc.Also bumps netdev to 0.47 and libc to 0.2.191 in the lockfile. The lockfile was still on 0.2.189, which is why CI didn't catch this. This overlaps with the netdev bump in #263.
Notes & open questions
Tested with
cargo check -p netwatch --target aarch64-apple-ios --all-features(fails with 22 errors before this change, passes after) andcargo test -p netwatch --all-featureson macOS (arm64).There's no iOS build in CI, so this could break again. Happy to add a build-only iOS job like the Android one if you want it here or in a follow-up.
Change checklist
cargo makepasses locally.🤖 Generated with Claude Code