Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The stable ABI in Rust is called the C ABI. Which means you can write C compatible dylibs/.so in Rust that can be used by any language with a C FFI. This is used in the real world for seamless rewrites of existing dynamic libraries in Rust - librsvg being a well-known case. You don't need all the hacks OP is talking about.


Sure, dropping down to a C interface is easy enough, but far from ideal. So much of Rust's expressive power is lost by doing so. What would be the downside of providing a stable ABI for an edition? It seems to me it resolves both sides of the argument on stable ABIs. By the way, I'm mostly thinking about Rust -> Rust dynamic linking.


In C++ land, classes are a part of the stable ABI. Pretty much everything is, except for templates (but including explicit template specializations).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: