Description
Split a restricted Cargo target triple-like token.
Package and container references combine names, selectors, conditions and platform metadata. A restricted lexical split can preserve these parts without validating registry identity, available targets, dependency graphs or runtime resolution.
Split a restricted Cargo target triple-like token.
When to use this tool
Use Cargo Target Triple Component Split when checking the stated package, Cargo or container-reference component.
How to use the tool and how it works
- Enter target. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read architecture, vendor, operatingSystem, environment. Use the output convention below.
Split a restricted Cargo target triple-like token. Accept three or four hyphen-separated ASCII alphanumeric/underscore components; return architecture, vendor, operatingSystem and optional environment.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| target | Target | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| architecture | Architecture | Required. Text; maximum UTF-16 length 8192. |
| vendor | Vendor | Required. Text; maximum UTF-16 length 8192. |
| operatingSystem | Operating System | Required. Text; maximum UTF-16 length 8192. |
| environment | Environment | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"target": "x86_64-unknown-linux-gnu"
},
"output": {
"architecture": "x86_64",
"vendor": "unknown",
"operatingSystem": "linux",
"environment": "gnu"
}
} Limitations and assumptions
- This fixed split is not validation of all Rust target names or installed targets.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use the relevant package manager, runtime or registry against the actual project for complete resolution and validation.
References
Similar or alternative tools
- Docker Image Digest Algorithm Split
Split a digest-qualified image reference.
- Docker Image Tag Colon Boundary
Split image and tag using the last colon after the last slash.