Parse simulator triple#130
Conversation
| Uclibceabihf, | ||
| Sgx, | ||
| /// The name Rust triples use for the iOS simulator environment. | ||
| Sim, |
There was a problem hiding this comment.
target-lexicon used to attempt to support Rust triples, but they turned out to diverge in too many ways, so now target-lexicon is just focusing on LLVM-like triples. So I think this means we should only add the LLVM form of the name, and not the Rust triple form.
There was a problem hiding this comment.
Idk., I think there is a bit of value in supporting both? But I guess that may be because I want to eventually rename the Rust *-apple-darwin triples to *-apple-macos, and then target-lexicon would be able to parse rustc triples again.
There was a problem hiding this comment.
But I'd also be fine with just removing (or deprecating) this variant.
There was a problem hiding this comment.
I've come to understand that Rust target names are not even intended to be parsed. There's nothing in Rust that requires a Rust target name to encode the LLVM target triple or the various target attributes it represents.
With that understanding, users that want to write code that recognizes Rust target names should use something like the platforms crate, and if they want the fields broken out like target-lexicon does, then they should obtain the target triple from the platforms crate and then pass that to target-lexicon.
My preference would be to remove the Rustc forms of the variant.
This is the LLVM triple, the
Environment::Simis used byrustc