3 ms·
It's really unfortunate. I've crowed about this before. The syscall interface on Darwin is so close to being stable. Even though it's not officially supported (
by titzer 3y ago
It's really unfortunate. I've crowed about this before. The syscall interface on Darwin is so close to being stable. Even though it's not officially supported (TM), the UNIX syscalls basically don't change. (Only one needless breaking change that I recall in the past 10 years on x86).
We need to shake the C demon and the only way is to push back on kernel ABIs changing.
Virgil doesn't depend on C and runs happily on Linux and Darwin. And yea, I know, MacOS breaks.
- eptcyka 3y agoIOCTLs have been broken between major versions before. And by broken, a field has been added to a struct.
- einpoklum 3y agoAnd?... If the IOCTLs are different, then you compile a different binary. What's the big deal? Rust is a compiled language after all.
- eqvinox 3y agoThere is no C demon. The OS ABI is (de facto — please spare the de jure nitpickery) a bunch of symbols you can call and a calling convention for them. You call into that ABI. What language is used to implement the other side of that ABI is irrelevant. The fact that this ABI is called "libc" doesn't really mean a whole lot. Neither is the fact that the same library contains a whole bunch of functions primarily useful to programs written in C.
- 10000truths 3y agoLibc isn't just an ABI, it's a library - one that relies on an opinionated runtime. That's the demon, it's incidental complexity that has been ossified by past design decisions. There is no fundamental reason that interacting with an OS has to require anything more than the minimum necessary to transfer data to/from the kernel (e.g. supervisor trap instruction).