Migrating Windows File-Watching Service to Rust on Remote VM – Feasibility via VPN or Path Mount?

⚓ Rust    📅 2025-07-14    👤 surdeus    👁️ 3      

surdeus

Hi all,

I currently run a Windows service on a client's intranet that watches a directory for file changes (create/modify/delete) and update db for events.

I want to migrate this to a Rust-based app running on my own Linux VM, outside their network.

The goal is to monitor the same directory remotely—either via VPN or by mounting the path (e.g., SMB/NFS).

Key questions:

  • Is this setup feasible from a Rust standpoint?
    Can I use Rust file-watching crates like notify on a mounted remote path and still reliably receive file events? Or do these crates rely too much on platform-specific inotify/kqueue/ReadDirectoryChangesW that might not work over a network mount?
  • Are there any recommended approaches or libraries to watch a remote path (over VPN or mounted share) for file changes using Rust?
    Is polling a better approach in such a case?
  • Are there caveats I should be aware of—performance, latency, stale reads, lack of event granularity, etc.—when trying to watch remote directories through mounted paths?

Looking for advice on the right approach, tools, or any real-world experiences.

Thanks!

1 post - 1 participant

Read full topic

🏷️ rust_feed