Giacomo Tesio
Giacomo Tesio

Reputation: 7210

Why do I need a C++ compiler to compile Rust?

This could be a very dumb question, but I'm wondering why the Rust compiler (written in Rust itself) require a C++ compiler.

I mean, a precompiled Rust compiler from the distribution should be enough, shouldn't it?

Upvotes: 20

Views: 7854

Answers (1)

rodrigo
rodrigo

Reputation: 98516

It is actually a reasonable question. The answer is that currently, the rust source includes a slightly patched version of LLVM, LLVM is written in C++, and that is not distributed in binary form. So you need a C++ compiler to build that.

Upvotes: 29

Related Questions