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

> They borrowed Apple’s C++ compiler backend, which lets Rust match C++ in speed without reimplementing decades of platform-specific code generation optimizations.

This was a pretty smart move by the Rust team, and this gave them a rock solid platform to go cross-platform. In words of Newton, "If I have seen further it is by standing on the shoulders of giants". Kudos team Rust, and let's hope they eat C++'s lunch soon.




Does this just mean LLVM? Because it's weird to describe it as "Apple's", Apple just uses it.


> Apple just uses it.

Apple "just uses LLVM" in the same way Apple "just uses Webkit".

Apple hired Chris Lattner back in 2005, just as he completed his PhD. At the time, LLVM could just barely compile Qt4[0] (the result didn't quite actually work yet) and was still hosted on CVS.

Lattner had to make LLVM production-ready (rather than a research project), add a bunch of major features, start a C/C++/ObjC frontend (Clang) and create a team of LLVM developers in the company.

Apple shipped their first bits of LLVM-based tooling in Leopard in 2007.

[0] https://web.archive.org/web/20111004073001/http://lists.trol...


LLVM started out as a research project at the University of Illinois, but Apple hired the lead developer in 2005 and put a ton of work into making it good enough to replace GCC. Apple also originally wrote Clang, LLVM's C/C++/Objective-C frontend, though Rust doesn't directly rely on this part.

Calling it "Apple's" threw me off too, but it's not entirely misleading because without Apple, it might not have become a production-ready compiler. At the least, I would say Apple did more than "just use it".


Apple doesn't "just use it". LLVM was originally developed at an university, then made production ready at Apple, and is still very much influenced by Apple, as Apple bases almost everything they make on it.


It's slightly oversimplified. Apple hired Chris Lattner from academia to ramp up work on LLVM & create Clang. (Apple always hated GNU stuff so the motive might not have been purely technical.)


There were a couple of purely technical reasons for Apple to pursue Clang.

1.) GCC was designed for command line use, not to provide integration (for instance, debugging info) into a modern IDE.

2.) Objective-C was not a priority for those who maintained GCC, but was for Apple.

https://en.wikipedia.org/wiki/Clang


The Objective-C story is a little more complicated. Originally Apple had a hostile fork of GCC and even initially refused to provide source code until the FSF lawyers got involved. It's a small wonder the GCC Objective-C support is as good as it is considering the politics.

Debugging info works similarly in all compilers (GCC, MSVC etc) - it's saved in the compiler output and read by the tools like IDEs.


>For instance, GCC uses a step called fold that is key to the overall compile process, which has the side effect of translating the code tree into a form that looks unlike the original source code. If an error is found during or after the fold step, it can be difficult to translate that back into one location in the original source.

https://en.wikipedia.org/wiki/Clang#Design


> it's weird to describe [LLVM] as "Apple's"

It's equally weird to describe Android as "Google's".


Are you being sarcastic? Because Android is very much Google's. Is there anyone else who has anywhere close to as much influence on the development of Android as Google has? Android is for the most part being developed behind closed doors at Google. About once a year they lob over a bunch of new code over the fence, and everyone else gets to develop from there.


It's an argument from absurdity. Nobody would say Android isn't Google's project, even though it wasn't started by Google, and wasn't written exclusively by Google employees.

Same applies to LLVM. The only reason it might not seem a fair comparison is that Apple has run LLVM as a truly open source endeavour, whereas Android (which marketed itself to geeks as the more open platform) has, as you rightly point out, been run as a closed-source project with occasional begrudging nods to its ever-shrinking open source subset.


Yes, this is LLVM.


It's pretty much standard these days for any non-VM language to target LLVM.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: