4 ms·
From looking at Cargo, it seems like Rust will compile everything from source so it won't have the same issues with binary compatibility that you get with diffe
by dantiberian 12y ago
From looking at Cargo, it seems like Rust will compile everything from source so it won't have the same issues with binary compatibility that you get with different versions of Scala. Is that correct?
- steveklabnik 12y agoThere is not a plan to have Cargo serve binary blobs, that's correct. However, I'm not familiar enough with the situation in Scala to comment on that part.
- dantiberian 12y agoThe short version is that any dependency (compiled) you pull in has to have been built with the same version of Scala you are using. Scala's build tool sbt alleviates this somewhat, though you can still have headaches using Scala libraries from other JVM languages.
- yaantc 12y agoHi Steve, First thanks a lot for Rust. I have a background in embedded development and the perspective to have a modern, safe by default language available in the future (it's a conservative domain ;) is very exciting! Cargo aside, the question of ABI stability is an interesting one: if an implementation stick to stable features, will it be possible to link code compiled with a newer compiler with a library compiled with an older version? Or is the stability only at the language level for now? I don't think ABI stability is required at this stage. There's been some experience with ABI changes with C++ and it's always possible to deal with it by having interfaces defined using a C ABI (stable) to shield oneself, if needed (if recompiling everything is not practical). But clarifying the status and plan would be nice. Thanks again.
- kibwen 12y agoABI stability is definitely not guaranteed at this time, as this would require standardizing a huge swath of behavior that is currently internal to the compiler. As mentioned in the OP, this is the same reason why syntax extensions cannot be stabilized as they are. So the answer is sadly no, different versions of the Rust compiler will not be guaranteed to produce binaries that can link to each other, short of using a C ABI.
- yxhuvud 12y agoYou will still need to be able to compile it though.