netwatch: objc2-system-configuration with default features pulls objc2-security into every macOS build

Open
#278 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@flub is already working on this.

Since Nov 20, 2026.

  • #279 by @flub — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust
Domain
build-system

Research direction

Start with netwatch's Cargo.toml entries for objc2-system-configuration and objc2-core-foundation, then inspect their feature usage and the linked pull request #279. Use cargo tree --target aarch64-apple-darwin -i objc2-security to check whether the dependency still enables Security bindings; done means the unused dependencies are removed or their defaults are disabled and the resulting tree no longer pulls in objc2-security.

Written by the indexing model from the issue text.

Description

netwatch 0.20.2 declares, for macOS and iOS:

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-system-configuration]
version = "0.3.2"

with default features on. objc2-system-configuration's default list includes objc2-security, so every iroh 1.5 build on macOS compiles and links bindings for the whole Security framework (objc2-security 0.3.2 carries #[link(name = "Security")]).

As far as I can tell, netwatch's own source doesn't use objc2_system_configuration (or objc2_core_foundation) at all: macOS interface listing and the network monitor go through the BSD routing-socket code. The only user is netdev 0.47, which already depends on objc2-system-configuration with default-features = false and only SCNetworkConfiguration. Cargo unifies features, so netwatch's declaration is what turns objc2-security on.

Would you take one of these?

  • add default-features = false to netwatch's objc2-system-configuration and objc2-core-foundation entries (with whatever features are actually needed, possibly none), or
  • drop the entries if they're unused.

Why it matters to us: we embed iroh in a macOS daemon whose architecture check forbids Security-framework bindings outside one audited crate, so we'd like to remove the exception we had to add for this edge. Happy to open a PR if that's easier.

Checked against: iroh 1.5.0, netwatch 0.20.2, netdev 0.47.x, objc2-system-configuration 0.3.2 (cargo tree --target aarch64-apple-darwin -i objc2-security).

Dominant language
Rust
Stars
34
Forks
56
Avg merge
2d 4h
Merged PRs (30d)
8

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from n0-computer/net-tools

All issues in n0-computer/net-tools

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.