Xray – A minimal screenshot tool for developers (Rust/Tauri) 6 months ago
thx
HN user
backend developer
thx
Implementation Details: We currently use a hybrid polling approach rather than a pure event-driven one.
Mechanism: The Rust backend runs a high-priority background loop using AXUIElementCopyElementAtPosition to track the element under the cursor.
Optimization: To minimize overhead, the polling frequency is throttled and only ramps up when the overlay is active. We use CoreGraphics to first detect mouse movement delta before triggering the heavier Accessibility API calls.
Efficiency is not the same as meaning. If you only valued the output, you’ve already lost
so sick
Interesting approach. It’s essentially a Just-in-Time documentation layer