Thanks for the kind words. One of the authors here :)
Actually this blog post started from a Twitter thread (that I forgot to link in the post https://twitter.com/Aviramyh/status/1544964265961979905) - if you have any more questions, feel free to ask. We didn't want to go "too low level" so the common dev would enjoy this :)
regarding extending, probably possible - I think it'd be easier with Zig (no weird stacks AFAIK) but we don't need it as they probably just use libc like most languages.
P.S would love hearing your thoughts about mirrord
Re:Hooking Go from Rust
by infiniteregrets on Friday August 26, 2022 @11:17AM
(#32608625)
Hey, seems like node uses libuv and in fact we did a blogpost on it!
https://metalbear.co/blog/mirrord-internals-hooking-libc-fun...
Re:Hooking Go from Rust
by generichuman on Friday August 26, 2022 @03:03PM
(#32611428)
> Edit: Apologies, maybe this is not that interesting of a wonderment. I did a little research and both Nim and Zig interface with libc.
Zig does not depend on libc on Linux, for example: https://github.com/ziglang/zig/blob/master/lib/std/os/linux....
You can choose to link libc though.
In case the author happens to see this and can respond, how did you figure all of this out? Would really enjoy a deep dive covering your process. This is brilliant.
I also wonder if it could be extended to Nim, Zig, or any other less-straightforward hookable languages [than C/C++].
Edit: Apologies, maybe this is not that interesting of a wonderment. I did a little research and both Nim and Zig interface with libc.
I'm not yet clear on whether node.js or Deno use libc, if any fellow HNers know please leave a reply! If they don't use libc, they could be interesting targets.