I was surprised to see hooking code like this being written in Rust. I've come to expect C sample code for purposes like these, so it's nice to see that there are actually alternatives when it comes to intercepting function calls and extracting data from a process.

Other options include bpftrace[1] or C, Python or Lua via BCC[2]

1: https://github.com/iovisor/bpftrace

2: https://github.com/iovisor/bcc