Comment by bsnnkv
The Accessibility framework is not what I would call a "hack" personally. It was quite well thought out and fully featured
I've spent the last month working on something similar in Rust with various macOS framework bindings and it's not really that scary
You don't really need anything other than a Rust dev env, rust-analyzer and a browser window with the Apple docs website and the objc2 crate docs.rs site open - no special XCode craziness required