32

While doing a custom installation of Rust on Windows 10, I am asked "Default host triple?"

I have no clue what this is, and the Rustup repository page, which came up in a web search, does not really explain it.

1
  • 2
    It's no longer a target "triple" but a quintic value. Check target-lexicon's struct Triple for the fields and the definition: Historically such things had three fields, though they’ve added additional fields over time. Commented Aug 17, 2023 at 8:27

1 Answer 1

32

Host triples identify the architecture and OS of the system that will ultimately run your executable. Mine is x86_64-pc-linux-gnu for example. The general form is cpu-vendor-os. Windows might be something like x86_64-pc-windows-msvc. You can read more at these links:

Sign up to request clarification or add additional context in comments.

13 Comments

Not surprised that it has an Automake history. I have always hated Autotools.
@Sabuncu: Actually, it has no automake history. This is a fundamental building block of compilers, and automake just had to deal with it.
@MatthieuM. Are you sure about that? I was under the impression that the specific cpu-vendor-os format was a GNU invention.
@TavianBarnes: Ah! You are trying to read way too much in my statement, I fear. (1) I was more talking about cross-compiling capabilities, and a way to indicate the target, than about platform triplets specifically to be honest. (2) Cross-compiling is only something native AOT compilers care about; JIT compilers don't care, compilers to IR don't care, ... So, yes, the sentence is not as precise as it could be; it's a careless comment, not a carefully thought-out answer.
For my Ubuntu it shows: x86_64-unknown-linux-gnu. Now I understand what is it! arch = x86_64, vendor = unknown, sys = linux, abi = gnu
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.