Comment

Comment by matheusmoreira

Yes! The difference is on Linux a shared library is not actually required for kernel system calls. The binary interface is stable and will not change.

https://github.com/torvalds/linux/blob/master/Documentation/...

On Windows and other operating systems, things such as system call numbers can and do change. There's no way to interface with the kernel without linking to vendor libraries.

So on Linux you can ditch libc and write your own code. A Rust liblinux is definitely possible, I tested it. You can even have a compiler generate the system calls for you! It just needs to support the simple calling convention. No libraries necessary. I've seen a project that does just that:

https://github.com/titzer/virgil

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton