netwatch: chrono is built on Windows but never used

Open
#280 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
33/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

In the Windows-specific netwatch dependency setup, remove the direct chrono version line and disable wmi's default features as described. Start by reading the netwatch Cargo.toml entries and check the existing draft pull request for the proposed two-line change. Done when the Windows-target cargo check passes and cargo tree --target all -i chrono shows no compiled dependency path.

Written by the indexing model from the issue text.

Description

On Windows, netwatch depends on wmi with default features, which pulls in chrono, plus a direct chrono = "0.4.23" line that only pins a minimum version. netwatch reads one string field from WMI (the default route's interface name) and never touches a date type. Seen on netwatch 0.20.2 and on main at 40fc258.

chrono is now flagged unmaintained (RUSTSEC-2026-0543), and you already ignore that in deny.toml. Dropping the direct line and using wmi with default-features = false stops it from being built. The change is two lines and waits here as a draft: https://github.com/irsync-dev/net-tools/pull/1

With it, cargo check -p netwatch --target x86_64-pc-windows-msvc --all-targets passes and cargo tree --target all -i chrono is empty. chrono stays in Cargo.lock as an optional dependency of wmi, but nothing compiles it.

#226 would make this moot by removing WMI altogether, but this is small and could land first. Happy to send the PR if you want it.

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.