Hacker News new | ask | show | jobs
by Mathnerd314 1551 days ago
It's true that the man pages assume C and the calling conventions are based on the C ABI, but it is possible to code the syscalls directly in assembly. In particular Go and Zig have such "bare-metal" syscalls.
1 comments

You still have to follow the C ABI when interfacing with C. That's the exact problem being called out in the post.

Zig solves interoperability by incorporating an entire copy of LLVM. Go does do bare metal syscalls, but as mentioned elsewhere in these comments, this has caused breakage on Mac when the kernel was updated, because this interface isn't stable.