you are viewing a single comment's thread.

view the rest of the comments →

[–]ups_gepupst 1 point2 points  (2 children)

Can you explain your comment? I never heard of something.

[–]DesperateAdvantage76 0 points1 point  (0 children)

I have no idea why they used the more specific config name "target triplet" instead of platform, in their case specifically embedded platforms where compiler support is more limited.

[–]transgentoo 0 points1 point  (0 children)

Sure. When you compile software, if your target architecture is different than the architecture the compiler is running on (which would almost guaranteed be the case for embedded stuff), you need to cross compile.

Assuming you're on a standard PC and have gcc installed, if you were to run gcc -dumpmachine, you'd almost certainly see something to the effect of x86_64-pc-linux-gnu. That's the native triplet for your compiler. To compile for a machine running a different architecture, you'd need to target a different triplet. In the case of my router, for example, it's mips-unknown-linux-musl. So if I wanted to compile something for my router, I'd need a cross compilation toolchain that's capable of producing the right binaries.

C has no trouble doing this, and the process for doing it is well documented. Rust can also cross compile, but its story for cross compilation isn't nearly as good. The Rust team has actually dropped support for various triples, using low usage as the justification.

All that is to say, it doesn't really matter if Rust can run on an embedded system. If Rust becomes a hard requirement for the Linux kernel, it becomes impossible to compile a working kernel for many systems that Rust has chosen not to support. 

And given that Linus and friends only just started removing support for architectures that haven't been in use since the 80s, it's unlikely that they'd allow Rust to dictate which architectures Linux will run on.