-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Platform
struct to Target
#127
Comments
So the thing is, we currently use it to access two separate pieces of information:
A triple composition is usually
Note however, that all components are technically optional, and each component is rarely useful on its own (with the exception of More importantly, we currently only have access to the target triple name. I believe it'd be a mistake to try and parse it any further than we already do, because it's really not meant to be parsed. The proper way to get access to the individual component would be through the nightly-only EDIT: See new comment in #126, I'm wrong, there are other ways. So getting the individual component is actually entirely possible. |
I have read the comment in #126. So, should the I agree that most of the component are not going to be useful or needed, especially on Windows. |
@roblabla: Based on the discussion in #115, it looks like the The If the One small correction to the |
This replaces/removes the `Platform` struct. The `WixArch` struct uses the [rustc-cfg](https://crates.io/crates/rustc-cfg) crate to parse the output from the `rustc --target <target> --print cfg` command and determine the WiX Toolset architecture for the `-arch` option of the WiX Toolset compiler (candle.exe). See Issue #127 for more information.
I am wondering if the
Platform
struct should be renamed and its implementation changed. It is currently just a "container" for a string that is the Rust compiler (rustc) target triple with some helper methods for extracting the "target/architecture/platform" in various string formats. This was type was originally created for thePlatform
attribute of theProduct
tag in the WiX Source (WXS) XML schema but it is deprecated (#121). ThePlatform
WiX variable is no longer needed and terminology is based on "arch" and "target" rather than "platform".An idea would be to rename the struct to "Target" or "RustcTriple" and have field members for the various components of the target triple. Then, implement a couple of
TryFrom
orFromStr
traits that parse a string into the individual components. Methods would be added to get each component. These methods would make creating WiX variables for each component very easy, too. What are the various components of the target triple?The text was updated successfully, but these errors were encountered: