On Linux, using direct syscalls is a good idea, since it's the stable userspace-kernel interface. There's really no need for libc on Linux, each language should just implement it's standard library on top of syscalls.
On Linux, using direct syscalls is a good idea, since it's the stable userspace-kernel interface. There's really no need for libc on Linux, each language should just implement it's standard library on top of syscalls.
This was previously discussed at length here: https://news.ycombinator.com/item?id=25999623
They didn't "get burned" they were "trying to provide a nice feature that wasn't as broadly compatible as they had hoped."
https://github.com/golang/go/issues/16606
If that's not "getting burned", I don't know what is. "Trying to provide a nice feature" is an excuse, and it can be argued that it is a valid and justifiable one, but nevertheless they knew that they were using an unstable ABI that could be pulled out from under them at any moment, and decided that it's worth the risk. I don't see what that has to do with "not being as broadly compatible as they had hoped", since it was all known well in advance.
Its not always not so clearcut. For example using pthreads instead of just calling clone can be useful for interop etc. Similarly, anything involving NSS is probably best done through libc. Having libc malloc integrated makes interacting with other C libs easier. And so on.
Rustix is a great implementation of that idea https://docs.rs/rustix/latest/rustix/
Any similar projects in other langs?
Found this as well: https://github.com/sunfishcode/mustang
Some discussion here: https://github.com/bytecodealliance/rustix/issues/76