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

I know only the slightest fundamentals of compilers in general and Rust’s compiler in particular, but would it be technically possible to ship library dependencies as compiled MIR code to older compilers to maintain forward compatibility?


MIR is not stable, so no. In some world where it was, and stability meant "unchanging" not "adds new features", then yes, in theory, it might be possible. Note that this even doesn't actually solve the parent's problem; they want to use the old compiler to compile the new code, not compile the new code with a new compiler and use that binary as a dependency for their code that's built with the old compiler.


Ah, I see. I don’t know where I got the idea that they were trying to use newer dependencies instead of just compiling newer code themselves. Thanks.


I mean, maybe they are, I guess that if you add "we somehow allow for binary packages to be distributed via crates.io" that would remove them needing to compile those dependencies themselves, right now, you do both of those things locally, so I was kind of assuming that was still the case.




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

Search: