Retarget 0.1.2 - straightforward Rust hooks for macOS and Windows

โš“ Rust    ๐Ÿ“… 2026-04-06    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 1      

surdeus

Hi all,

Iโ€™ve been working on retarget, a Rust crate for cross-platform native hooking on macOS and Windows, and I just published 0.1.2.

Crate: crates.io: Rust Package Registry
Repo: GitHub - veecore/retarget: Work-in-progress cross-platform function, Objective-C, and COM hooking for macOS and Windows. ยท GitHub

The main goal is to keep the hook story small and readable. The crate currently focuses on:

  • exported function hooks
  • Objective-C method hooks
  • COM method hooks

A lot of the recent work was about simplifying the API and reducing runtime/macro complexity so the common path feels more obvious:

  • declare hooks near the code that owns them
  • install once
  • optionally observe hits
  • keep lower-level details out of the way unless you actually need them

Thereโ€™s also a demo package in the repo that injects a hook library into a live screenshot process and swaps the returned image with a synthetic frame, which has been a nice stress test for the API shape.

Iโ€™d especially love feedback on:

  • API ergonomics
  • macro design
  • naming
  • where the line should be between convenience and low-level control

Thanks if you take a look.

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed