3 ms·
Rust has optional support for the stable C ABI. I'm not sure what you mean by the C ABI being "a huge pain to keep stable"; it's simple and the requirements for
by zozbot234 5y ago
Rust has optional support for the stable C ABI. I'm not sure what you mean by the C ABI being "a huge pain to keep stable"; it's simple and the requirements for stability are well known, it's also the main choice for FFI in a variety of language ecosystems.
- pjmlp 5y agoBecause in reality there is no such thing as C ABI, only the OS ABI. On OSes that happen to be written in C, most devs tend to misunderstand the OS ABI for C ABI and then use both interchangeably. A new OS update can bring changes, also on platforms whose OS isn't written in C, several C compiler can opt for different kinds of ABI thus not allowed for cross compiler linkage without extra steps.
- waddlesplash 5y agoThe requirements for stability being well known do not make them easy to follow. If you really want stability, you basically have to eschew all use of structs, or add struct versioning, to begin with. Then you can't add or remove parameters from functions, but instead must add new functions only. Those are of course just the first two things; in practice, most libraries do not even try to follow them, and just bump the SONAME version with anything besides a minor bugfix release.