platforms-3.1.2/.cargo_vcs_info.json0000644000000001470000000000100130500ustar { "git": { "sha1": "6984bbf83a85bba4c910c98fa0ba4e0524e29c71" }, "path_in_vcs": "platforms" }platforms-3.1.2/.gitignore000064400000000000000000000001361046102023000136260ustar 00000000000000# ignore the .md file automatically downloaded by the regeneration script platform-support.md platforms-3.1.2/CHANGELOG.md000064400000000000000000000051761046102023000134600ustar 00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 3.0.1 (2022-07-20) ### Added - New tier 3 targets ([#614]) ## 3.0.0 (2022-04-23) ### Added - `target_endian` and `target_pointer_width` fields on `Platform` ([#516]) ### Changed - Auto-generate platforms registry from rustc ([#516]) - Make `Platform` struct `#[non_exhaustive]` to allow new fields ([#516]) - Make `Platform::env` field non-optional ([#516]) ### Fixed - `serde` deserializers ([#527]) [#516]: https://github.com/rustsec/rustsec/pull/516 [#527]: https://github.com/rustsec/rustsec/pull/527 ## 2.0.0 (2021-11-15) ### Added - New tier 3 targets ([#357]) ### Changed - Sync with Rust platform support documentation ([#353]) - Follow `upper_case_acronyms` conventions ([#473]) - Make tier modules non-`pub` ([#483]) - Make `Platform::ALL` an inherent constant ([#484]) [#353]: https://github.com/rustsec/rustsec/pull/353 [#357]: https://github.com/rustsec/rustsec/pull/357 [#473]: https://github.com/rustsec/rustsec/pull/473 [#483]: https://github.com/rustsec/rustsec/pull/483 [#484]: https://github.com/rustsec/rustsec/pull/484 ## 1.1.0 (2020-12-28) ### Added - `aarch64-apple-darwin` platform definition ## 1.0.3 (2020-10-29) ### Changed - Source `Platform::guess_current` from `$TARGET` environment variable when available ## 1.0.2 (2020-09-14) ### Removed - `const fn` on `Platforms::all` ## 1.0.1 (2020-09-14) [YANKED] ### Changed - Make `Platform::all()` a `const fn` - Refactor `Platform::find` and `::guess_current` - Rename `ALL_PLATFORMS` to `Platform::all()` ## 1.0.0 (2020-09-13) [YANKED] ### Added - Ensure all types have `FromStr`, `Display`, and `serde` impls - `aarch64-pc-windows-msvc` platform ### Changed - Make extensible enums `non_exhaustive`; MSRV 1.40+ ## 0.2.1 (2019-09-24) - Initial GitHub Actions config - Properly set up `target::os::TARGET_OS` const for unknown OS ## 0.2.0 (2019-01-13) - Update platforms to match RustForge - Update to Rust 2018 edition ## 0.1.4 (2018-07-29) - `x86_64-apple-darwin`: fix typo in target triple name - Have markdown-table-gen output links to Platform structs on docs.rs ## 0.1.3 (2018-07-28) - Fix Travis CI badge in Cargo.toml ## 0.1.2 (2018-07-27) - Add table of supported platforms to README.md using Markdown generator ## 0.1.1 (2018-07-27) - Impl `Display` and `std::error::Error` traits for `packages::Error` ## 0.1.0 (2018-07-26) - Add `guess_current()` - Optional serde support ## 0.0.1 (2018-07-26) - Initial release platforms-3.1.2/Cargo.toml0000644000000025030000000000100110440ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "platforms" version = "3.1.2" authors = [ "Tony Arcieri ", "Sergey \"Shnatsel\" Davidoff ", ] exclude = [ "platforms-data-gen/", "markdown-table-gen/", "README.header.md", "platform-support.md", "regenerate-platforms-crate.sh", ] description = """ Rust platform registry with information about valid Rust platforms (target triple, target_arch, target_os) sourced from the Rust compiler. """ homepage = "https://rustsec.org" readme = "README.md" keywords = [ "architectures", "cpu", "os", "targets", "triples", ] categories = [ "development-tools", "no-std", ] license = "Apache-2.0 OR MIT" repository = "https://github.com/rustsec/rustsec/tree/main/platforms" [dependencies.serde] version = "1" optional = true [features] default = ["std"] std = [] platforms-3.1.2/Cargo.toml.orig000064400000000000000000000015161046102023000145300ustar 00000000000000[package] name = "platforms" description = """ Rust platform registry with information about valid Rust platforms (target triple, target_arch, target_os) sourced from the Rust compiler. """ version = "3.1.2" authors = ["Tony Arcieri ", "Sergey \"Shnatsel\" Davidoff "] license = "Apache-2.0 OR MIT" homepage = "https://rustsec.org" repository = "https://github.com/rustsec/rustsec/tree/main/platforms" readme = "README.md" categories = ["development-tools", "no-std"] keywords = ["architectures", "cpu", "os", "targets", "triples"] edition = "2018" exclude = ["platforms-data-gen/", "markdown-table-gen/", "README.header.md", "platform-support.md", "regenerate-platforms-crate.sh"] [dependencies] serde = { version = "1", optional = true } [features] default = ["std"] std = [] platforms-3.1.2/LICENSE-APACHE000064400000000000000000000251371046102023000135720ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. platforms-3.1.2/LICENSE-MIT000064400000000000000000000020731046102023000132740ustar 00000000000000Copyright (c) 2018-2020 The Rust Secure Code Working Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. platforms-3.1.2/README.md000064400000000000000000001326731046102023000131310ustar 00000000000000# RustSec: `platforms` crate [![Latest Version][crate-image]][crate-link] [![Docs][docs-image]][docs-link] [![Build Status][build-image]][build-link] ![Apache 2/MIT licensed][license-image] ![MSRV][rustc-image] [![Project Chat][zulip-image]][zulip-link] Rust platform registry: provides programmatic access to information about valid Rust platforms, sourced from the Rust compiler. [Documentation][docs-link] ## About This crate provides programmatic access to information about valid Rust platforms. This is useful for systems which document/inventory information relevant to Rust platforms. It was created for the [RustSec Advisory Database] and is maintained by the [Rust Secure Code Working Group][wg-secure-code]. It is not intended to be a tool for gating builds based on the current platform or as a replacement for Rust's existing conditional compilation features: please use those for build purposes. ## Minimum Supported Rust Version Rust **1.40** or higher. Minimum supported Rust version may be changed in the future, but it will be accompanied by a minor version bump. ## SemVer Policy We reserve the right to add and remove platforms from the registry without bumping major versions. This doesn't change the API, but can break crates that expect platforms to be there if they are removed. If we remove platforms, we will bump the minor version of this crate. [//]: # (badges) [crate-image]: https://buildstats.info/crate/platforms [crate-link]: https://crates.io/crates/platforms [docs-image]: https://docs.rs/platforms/badge.svg [docs-link]: https://docs.rs/platforms/ [build-image]: https://github.com/RustSec/rustsec/actions/workflows/platforms.yml/badge.svg [build-link]: https://github.com/RustSec/rustsec/actions/workflows/platforms.yml [license-image]: https://img.shields.io/badge/license-Apache2%2FMIT-blue.svg [rustc-image]: https://img.shields.io/badge/rustc-1.40+-blue.svg [zulip-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [zulip-link]: https://rust-lang.zulipchat.com/#narrow/stream/146229-wg-secure-code/ [//]: # (general links) [RustSec Advisory Database]: https://github.com/RustSec [wg-secure-code]: https://www.rust-lang.org/governance/wgs/wg-secure-code ## Registered Platforms ### Tier 1 | target triple | target_arch | target_os | target_env | |----------------------------------------|-------------|------------|------------| | [aarch64-unknown-linux-gnu] | aarch64 | linux | gnu | | [i686-pc-windows-gnu] | x86 | windows | gnu | | [i686-pc-windows-msvc] | x86 | windows | msvc | | [i686-unknown-linux-gnu] | x86 | linux | gnu | | [x86_64-apple-darwin] | x86_64 | macos | | | [x86_64-pc-windows-gnu] | x86_64 | windows | gnu | | [x86_64-pc-windows-msvc] | x86_64 | windows | msvc | | [x86_64-unknown-linux-gnu] | x86_64 | linux | gnu | ### Tier 2 | target triple | target_arch | target_os | target_env | |----------------------------------------|-------------|------------|------------| | [aarch64-apple-darwin] | aarch64 | macos | | | [aarch64-apple-ios] | aarch64 | ios | | | [aarch64-apple-ios-sim] | aarch64 | ios | | | [aarch64-fuchsia] | aarch64 | fuchsia | | | [aarch64-linux-android] | aarch64 | android | | | [aarch64-pc-windows-msvc] | aarch64 | windows | msvc | | [aarch64-unknown-fuchsia] | aarch64 | fuchsia | | | [aarch64-unknown-linux-musl] | aarch64 | linux | musl | | [aarch64-unknown-none] | aarch64 | none | | | [aarch64-unknown-none-softfloat] | aarch64 | none | | | [aarch64-unknown-uefi] | aarch64 | uefi | | | [arm-linux-androideabi] | arm | android | | | [arm-unknown-linux-gnueabi] | arm | linux | gnu | | [arm-unknown-linux-gnueabihf] | arm | linux | gnu | | [arm-unknown-linux-musleabi] | arm | linux | musl | | [arm-unknown-linux-musleabihf] | arm | linux | musl | | [armebv7r-none-eabi] | arm | none | | | [armebv7r-none-eabihf] | arm | none | | | [armv5te-unknown-linux-gnueabi] | arm | linux | gnu | | [armv5te-unknown-linux-musleabi] | arm | linux | musl | | [armv7-linux-androideabi] | arm | android | | | [armv7-unknown-linux-gnueabi] | arm | linux | gnu | | [armv7-unknown-linux-gnueabihf] | arm | linux | gnu | | [armv7-unknown-linux-musleabi] | arm | linux | musl | | [armv7-unknown-linux-musleabihf] | arm | linux | musl | | [armv7a-none-eabi] | arm | none | | | [armv7r-none-eabi] | arm | none | | | [armv7r-none-eabihf] | arm | none | | | [asmjs-unknown-emscripten] | wasm32 | emscripten | | | [i586-pc-windows-msvc] | x86 | windows | msvc | | [i586-unknown-linux-gnu] | x86 | linux | gnu | | [i586-unknown-linux-musl] | x86 | linux | musl | | [i686-linux-android] | x86 | android | | | [i686-unknown-freebsd] | x86 | freebsd | | | [i686-unknown-linux-musl] | x86 | linux | musl | | [i686-unknown-uefi] | x86 | uefi | | | [loongarch64-unknown-linux-gnu] | loongarch64 | linux | gnu | | [mips-unknown-linux-gnu] | mips | linux | gnu | | [mips-unknown-linux-musl] | mips | linux | musl | | [mips64-unknown-linux-gnuabi64] | mips64 | linux | gnu | | [mips64-unknown-linux-muslabi64] | mips64 | linux | musl | | [mips64el-unknown-linux-gnuabi64] | mips64 | linux | gnu | | [mips64el-unknown-linux-muslabi64] | mips64 | linux | musl | | [mipsel-unknown-linux-gnu] | mips | linux | gnu | | [mipsel-unknown-linux-musl] | mips | linux | musl | | [nvptx64-nvidia-cuda] | nvptx64 | cuda | | | [powerpc-unknown-linux-gnu] | powerpc | linux | gnu | | [powerpc64-unknown-linux-gnu] | powerpc64 | linux | gnu | | [powerpc64le-unknown-linux-gnu] | powerpc64 | linux | gnu | | [riscv32i-unknown-none-elf] | riscv32 | none | | | [riscv32imac-unknown-none-elf] | riscv32 | none | | | [riscv32imc-unknown-none-elf] | riscv32 | none | | | [riscv64gc-unknown-linux-gnu] | riscv64 | linux | gnu | | [riscv64gc-unknown-none-elf] | riscv64 | none | | | [riscv64imac-unknown-none-elf] | riscv64 | none | | | [s390x-unknown-linux-gnu] | s390x | linux | gnu | | [sparc64-unknown-linux-gnu] | sparc64 | linux | gnu | | [sparcv9-sun-solaris] | sparc64 | solaris | | | [thumbv6m-none-eabi] | arm | none | | | [thumbv7em-none-eabi] | arm | none | | | [thumbv7em-none-eabihf] | arm | none | | | [thumbv7m-none-eabi] | arm | none | | | [thumbv7neon-linux-androideabi] | arm | android | | | [thumbv7neon-unknown-linux-gnueabihf] | arm | linux | gnu | | [thumbv8m.base-none-eabi] | arm | none | | | [thumbv8m.main-none-eabi] | arm | none | | | [thumbv8m.main-none-eabihf] | arm | none | | | [wasm32-unknown-emscripten] | wasm32 | emscripten | | | [wasm32-unknown-unknown] | wasm32 | unknown | | | [wasm32-wasi] | wasm32 | wasi | | | [x86_64-apple-ios] | x86_64 | ios | | | [x86_64-fortanix-unknown-sgx] | x86_64 | unknown | sgx | | [x86_64-fuchsia] | x86_64 | fuchsia | | | [x86_64-linux-android] | x86_64 | android | | | [x86_64-pc-solaris] | x86_64 | solaris | | | [x86_64-unknown-freebsd] | x86_64 | freebsd | | | [x86_64-unknown-fuchsia] | x86_64 | fuchsia | | | [x86_64-unknown-illumos] | x86_64 | illumos | | | [x86_64-unknown-linux-gnux32] | x86_64 | linux | gnu | | [x86_64-unknown-linux-musl] | x86_64 | linux | musl | | [x86_64-unknown-netbsd] | x86_64 | netbsd | | | [x86_64-unknown-none] | x86_64 | none | | | [x86_64-unknown-redox] | x86_64 | redox | relibc | | [x86_64-unknown-uefi] | x86_64 | uefi | | ### Tier 3 | target triple | target_arch | target_os | target_env | |----------------------------------------|-------------|------------|------------| | [aarch64-apple-ios-macabi] | aarch64 | ios | | | [aarch64-apple-tvos] | aarch64 | tvos | | | [aarch64-apple-watchos-sim] | aarch64 | watchos | | | [aarch64-kmc-solid_asp3] | aarch64 | solid_asp3 | | | [aarch64-nintendo-switch-freestanding] | aarch64 | horizon | | | [aarch64-pc-windows-gnullvm] | aarch64 | windows | gnu | | [aarch64-unknown-freebsd] | aarch64 | freebsd | | | [aarch64-unknown-hermit] | aarch64 | hermit | | | [aarch64-unknown-linux-gnu_ilp32] | aarch64 | linux | gnu | | [aarch64-unknown-linux-ohos] | aarch64 | linux | ohos | | [aarch64-unknown-netbsd] | aarch64 | netbsd | | | [aarch64-unknown-nto-qnx710] | aarch64 | nto | nto71 | | [aarch64-unknown-openbsd] | aarch64 | openbsd | | | [aarch64-unknown-redox] | aarch64 | redox | relibc | | [aarch64-unknown-teeos] | aarch64 | teeos | | | [aarch64-uwp-windows-msvc] | aarch64 | windows | msvc | | [aarch64-wrs-vxworks] | aarch64 | vxworks | gnu | | [aarch64_be-unknown-linux-gnu] | aarch64 | linux | gnu | | [aarch64_be-unknown-linux-gnu_ilp32] | aarch64 | linux | gnu | | [aarch64_be-unknown-netbsd] | aarch64 | netbsd | | | [arm64_32-apple-watchos] | aarch64 | watchos | | | [armeb-unknown-linux-gnueabi] | arm | linux | gnu | | [armv4t-none-eabi] | arm | none | | | [armv4t-unknown-linux-gnueabi] | arm | linux | gnu | | [armv5te-none-eabi] | arm | none | | | [armv5te-unknown-linux-uclibceabi] | arm | linux | uclibc | | [armv6-unknown-freebsd] | arm | freebsd | gnueabihf | | [armv6-unknown-netbsd-eabihf] | arm | netbsd | eabihf | | [armv6k-nintendo-3ds] | arm | horizon | newlib | | [armv7-apple-ios] | arm | ios | | | [armv7-sony-vita-newlibeabihf] | arm | vita | newlib | | [armv7-unknown-freebsd] | arm | freebsd | gnueabihf | | [armv7-unknown-linux-ohos] | arm | linux | ohos | | [armv7-unknown-linux-uclibceabi] | arm | linux | uclibc | | [armv7-unknown-linux-uclibceabihf] | arm | linux | uclibc | | [armv7-unknown-netbsd-eabihf] | arm | netbsd | eabihf | | [armv7-wrs-vxworks-eabihf] | arm | vxworks | gnu | | [armv7a-kmc-solid_asp3-eabi] | arm | solid_asp3 | | | [armv7a-kmc-solid_asp3-eabihf] | arm | solid_asp3 | | | [armv7a-none-eabihf] | arm | none | | | [armv7k-apple-watchos] | arm | watchos | | | [armv7s-apple-ios] | arm | ios | | | [avr-unknown-gnu-atmega328] | avr | none | | | [bpfeb-unknown-none] | bpf | none | | | [bpfel-unknown-none] | bpf | none | | | [csky-unknown-linux-gnuabiv2] | csky | linux | gnu | | [hexagon-unknown-linux-musl] | hexagon | linux | musl | | [i386-apple-ios] | x86 | ios | | | [i586-pc-nto-qnx700] | x86 | nto | nto70 | | [i686-apple-darwin] | x86 | macos | | | [i686-unknown-haiku] | x86 | haiku | | | [i686-unknown-netbsd] | x86 | netbsd | | | [i686-unknown-openbsd] | x86 | openbsd | | | [i686-uwp-windows-gnu] | x86 | windows | gnu | | [i686-uwp-windows-msvc] | x86 | windows | msvc | | [i686-wrs-vxworks] | x86 | vxworks | gnu | | [loongarch64-unknown-none] | loongarch64 | none | | | [loongarch64-unknown-none-softfloat] | loongarch64 | none | | | [m68k-unknown-linux-gnu] | m68k | linux | gnu | | [mips-unknown-linux-uclibc] | mips | linux | uclibc | | [mips64-openwrt-linux-musl] | mips64 | linux | musl | | [mipsel-sony-psp] | mips | psp | | | [mipsel-sony-psx] | mips | none | psx | | [mipsel-unknown-linux-uclibc] | mips | linux | uclibc | | [mipsel-unknown-none] | mips | none | | | [mipsisa32r6-unknown-linux-gnu] | mips32r6 | linux | gnu | | [mipsisa32r6el-unknown-linux-gnu] | mips32r6 | linux | gnu | | [mipsisa64r6-unknown-linux-gnuabi64] | mips64r6 | linux | gnu | | [mipsisa64r6el-unknown-linux-gnuabi64] | mips64r6 | linux | gnu | | [msp430-none-elf] | msp430 | none | | | [powerpc-unknown-freebsd] | powerpc | freebsd | | | [powerpc-unknown-linux-gnuspe] | powerpc | linux | gnu | | [powerpc-unknown-linux-musl] | powerpc | linux | musl | | [powerpc-unknown-netbsd] | powerpc | netbsd | | | [powerpc-unknown-openbsd] | powerpc | openbsd | | | [powerpc-wrs-vxworks] | powerpc | vxworks | gnu | | [powerpc-wrs-vxworks-spe] | powerpc | vxworks | gnu | | [powerpc64-ibm-aix] | powerpc64 | aix | | | [powerpc64-unknown-freebsd] | powerpc64 | freebsd | | | [powerpc64-unknown-linux-musl] | powerpc64 | linux | musl | | [powerpc64-unknown-openbsd] | powerpc64 | openbsd | | | [powerpc64-wrs-vxworks] | powerpc64 | vxworks | gnu | | [powerpc64le-unknown-freebsd] | powerpc64 | freebsd | | | [powerpc64le-unknown-linux-musl] | powerpc64 | linux | musl | | [riscv32gc-unknown-linux-gnu] | riscv32 | linux | gnu | | [riscv32gc-unknown-linux-musl] | riscv32 | linux | musl | | [riscv32im-unknown-none-elf] | riscv32 | none | | | [riscv32imac-esp-espidf] | riscv32 | espidf | newlib | | [riscv32imac-unknown-xous-elf] | riscv32 | xous | | | [riscv32imc-esp-espidf] | riscv32 | espidf | newlib | | [riscv64-linux-android] | riscv64 | android | | | [riscv64gc-unknown-freebsd] | riscv64 | freebsd | | | [riscv64gc-unknown-fuchsia] | riscv64 | fuchsia | | | [riscv64gc-unknown-hermit] | riscv64 | hermit | | | [riscv64gc-unknown-linux-musl] | riscv64 | linux | musl | | [riscv64gc-unknown-netbsd] | riscv64 | netbsd | | | [riscv64gc-unknown-openbsd] | riscv64 | openbsd | | | [s390x-unknown-linux-musl] | s390x | linux | musl | | [sparc-unknown-linux-gnu] | sparc | linux | gnu | | [sparc-unknown-none-elf] | sparc | none | | | [sparc64-unknown-netbsd] | sparc64 | netbsd | | | [sparc64-unknown-openbsd] | sparc64 | openbsd | | | [thumbv4t-none-eabi] | arm | none | | | [thumbv5te-none-eabi] | arm | none | | | [thumbv7a-pc-windows-msvc] | arm | windows | msvc | | [thumbv7a-uwp-windows-msvc] | arm | windows | msvc | | [thumbv7neon-unknown-linux-musleabihf] | arm | linux | musl | | [wasm32-wasi-preview1-threads] | wasm32 | wasi | | | [wasm64-unknown-unknown] | wasm64 | unknown | | | [x86_64-apple-ios-macabi] | x86_64 | ios | | | [x86_64-apple-tvos] | x86_64 | tvos | | | [x86_64-apple-watchos-sim] | x86_64 | watchos | | | [x86_64-pc-nto-qnx710] | x86_64 | nto | nto71 | | [x86_64-pc-windows-gnullvm] | x86_64 | windows | gnu | | [x86_64-sun-solaris] | x86_64 | solaris | | | [x86_64-unikraft-linux-musl] | x86_64 | linux | musl | | [x86_64-unknown-dragonfly] | x86_64 | dragonfly | | | [x86_64-unknown-haiku] | x86_64 | haiku | | | [x86_64-unknown-hermit] | x86_64 | hermit | | | [x86_64-unknown-l4re-uclibc] | x86_64 | l4re | uclibc | | [x86_64-unknown-linux-ohos] | x86_64 | linux | ohos | | [x86_64-unknown-openbsd] | x86_64 | openbsd | | | [x86_64-uwp-windows-gnu] | x86_64 | windows | gnu | | [x86_64-uwp-windows-msvc] | x86_64 | windows | msvc | | [x86_64-wrs-vxworks] | x86_64 | vxworks | gnu | | [x86_64h-apple-darwin] | x86_64 | macos | | [aarch64-apple-darwin]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_APPLE_DARWIN.html [aarch64-apple-ios]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_APPLE_IOS.html [aarch64-apple-ios-macabi]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_APPLE_IOS_MACABI.html [aarch64-apple-ios-sim]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_APPLE_IOS_SIM.html [aarch64-apple-tvos]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_APPLE_TVOS.html [aarch64-apple-watchos-sim]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_APPLE_WATCHOS_SIM.html [aarch64-fuchsia]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_FUCHSIA.html [aarch64-kmc-solid_asp3]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_KMC_SOLID_ASP3.html [aarch64-linux-android]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_LINUX_ANDROID.html [aarch64-nintendo-switch-freestanding]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_NINTENDO_SWITCH_FREESTANDING.html [aarch64-pc-windows-gnullvm]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_PC_WINDOWS_GNULLVM.html [aarch64-pc-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_PC_WINDOWS_MSVC.html [aarch64-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_FREEBSD.html [aarch64-unknown-fuchsia]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_FUCHSIA.html [aarch64-unknown-hermit]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_HERMIT.html [aarch64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_LINUX_GNU.html [aarch64-unknown-linux-gnu_ilp32]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_LINUX_GNU_ILP32.html [aarch64-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_LINUX_MUSL.html [aarch64-unknown-linux-ohos]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_LINUX_OHOS.html [aarch64-unknown-netbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_NETBSD.html [aarch64-unknown-none]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_NONE.html [aarch64-unknown-none-softfloat]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_NONE_SOFTFLOAT.html [aarch64-unknown-nto-qnx710]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_NTO_QNX710.html [aarch64-unknown-openbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_OPENBSD.html [aarch64-unknown-redox]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_REDOX.html [aarch64-unknown-teeos]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_TEEOS.html [aarch64-unknown-uefi]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UNKNOWN_UEFI.html [aarch64-uwp-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_UWP_WINDOWS_MSVC.html [aarch64-wrs-vxworks]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_WRS_VXWORKS.html [aarch64_be-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_BE_UNKNOWN_LINUX_GNU.html [aarch64_be-unknown-linux-gnu_ilp32]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_BE_UNKNOWN_LINUX_GNU_ILP32.html [aarch64_be-unknown-netbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.AARCH64_BE_UNKNOWN_NETBSD.html [arm-linux-androideabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARM_LINUX_ANDROIDEABI.html [arm-unknown-linux-gnueabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARM_UNKNOWN_LINUX_GNUEABI.html [arm-unknown-linux-gnueabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARM_UNKNOWN_LINUX_GNUEABIHF.html [arm-unknown-linux-musleabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARM_UNKNOWN_LINUX_MUSLEABI.html [arm-unknown-linux-musleabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARM_UNKNOWN_LINUX_MUSLEABIHF.html [arm64_32-apple-watchos]: https://docs.rs/platforms/latest/platforms/platform/constant.ARM64_32_APPLE_WATCHOS.html [armeb-unknown-linux-gnueabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMEB_UNKNOWN_LINUX_GNUEABI.html [armebv7r-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMEBV7R_NONE_EABI.html [armebv7r-none-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMEBV7R_NONE_EABIHF.html [armv4t-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV4T_NONE_EABI.html [armv4t-unknown-linux-gnueabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV4T_UNKNOWN_LINUX_GNUEABI.html [armv5te-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV5TE_NONE_EABI.html [armv5te-unknown-linux-gnueabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV5TE_UNKNOWN_LINUX_GNUEABI.html [armv5te-unknown-linux-musleabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV5TE_UNKNOWN_LINUX_MUSLEABI.html [armv5te-unknown-linux-uclibceabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV5TE_UNKNOWN_LINUX_UCLIBCEABI.html [armv6-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV6_UNKNOWN_FREEBSD.html [armv6-unknown-netbsd-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV6_UNKNOWN_NETBSD_EABIHF.html [armv6k-nintendo-3ds]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV6K_NINTENDO_3DS.html [armv7-apple-ios]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_APPLE_IOS.html [armv7-linux-androideabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_LINUX_ANDROIDEABI.html [armv7-sony-vita-newlibeabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_SONY_VITA_NEWLIBEABIHF.html [armv7-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_FREEBSD.html [armv7-unknown-linux-gnueabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_LINUX_GNUEABI.html [armv7-unknown-linux-gnueabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_LINUX_GNUEABIHF.html [armv7-unknown-linux-musleabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_LINUX_MUSLEABI.html [armv7-unknown-linux-musleabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_LINUX_MUSLEABIHF.html [armv7-unknown-linux-ohos]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_LINUX_OHOS.html [armv7-unknown-linux-uclibceabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_LINUX_UCLIBCEABI.html [armv7-unknown-linux-uclibceabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF.html [armv7-unknown-netbsd-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_UNKNOWN_NETBSD_EABIHF.html [armv7-wrs-vxworks-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7_WRS_VXWORKS_EABIHF.html [armv7a-kmc-solid_asp3-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7A_KMC_SOLID_ASP3_EABI.html [armv7a-kmc-solid_asp3-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7A_KMC_SOLID_ASP3_EABIHF.html [armv7a-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7A_NONE_EABI.html [armv7a-none-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7A_NONE_EABIHF.html [armv7k-apple-watchos]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7K_APPLE_WATCHOS.html [armv7r-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7R_NONE_EABI.html [armv7r-none-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7R_NONE_EABIHF.html [armv7s-apple-ios]: https://docs.rs/platforms/latest/platforms/platform/constant.ARMV7S_APPLE_IOS.html [asmjs-unknown-emscripten]: https://docs.rs/platforms/latest/platforms/platform/constant.ASMJS_UNKNOWN_EMSCRIPTEN.html [avr-unknown-gnu-atmega328]: https://docs.rs/platforms/latest/platforms/platform/constant.AVR_UNKNOWN_GNU_ATMEGA328.html [bpfeb-unknown-none]: https://docs.rs/platforms/latest/platforms/platform/constant.BPFEB_UNKNOWN_NONE.html [bpfel-unknown-none]: https://docs.rs/platforms/latest/platforms/platform/constant.BPFEL_UNKNOWN_NONE.html [csky-unknown-linux-gnuabiv2]: https://docs.rs/platforms/latest/platforms/platform/constant.CSKY_UNKNOWN_LINUX_GNUABIV2.html [hexagon-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.HEXAGON_UNKNOWN_LINUX_MUSL.html [i386-apple-ios]: https://docs.rs/platforms/latest/platforms/platform/constant.I386_APPLE_IOS.html [i586-pc-nto-qnx700]: https://docs.rs/platforms/latest/platforms/platform/constant.I586_PC_NTO_QNX700.html [i586-pc-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.I586_PC_WINDOWS_MSVC.html [i586-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.I586_UNKNOWN_LINUX_GNU.html [i586-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.I586_UNKNOWN_LINUX_MUSL.html [i686-apple-darwin]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_APPLE_DARWIN.html [i686-linux-android]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_LINUX_ANDROID.html [i686-pc-windows-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_PC_WINDOWS_GNU.html [i686-pc-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_PC_WINDOWS_MSVC.html [i686-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UNKNOWN_FREEBSD.html [i686-unknown-haiku]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UNKNOWN_HAIKU.html [i686-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UNKNOWN_LINUX_GNU.html [i686-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UNKNOWN_LINUX_MUSL.html [i686-unknown-netbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UNKNOWN_NETBSD.html [i686-unknown-openbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UNKNOWN_OPENBSD.html [i686-unknown-uefi]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UNKNOWN_UEFI.html [i686-uwp-windows-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UWP_WINDOWS_GNU.html [i686-uwp-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_UWP_WINDOWS_MSVC.html [i686-wrs-vxworks]: https://docs.rs/platforms/latest/platforms/platform/constant.I686_WRS_VXWORKS.html [loongarch64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.LOONGARCH64_UNKNOWN_LINUX_GNU.html [loongarch64-unknown-none]: https://docs.rs/platforms/latest/platforms/platform/constant.LOONGARCH64_UNKNOWN_NONE.html [loongarch64-unknown-none-softfloat]: https://docs.rs/platforms/latest/platforms/platform/constant.LOONGARCH64_UNKNOWN_NONE_SOFTFLOAT.html [m68k-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.M68K_UNKNOWN_LINUX_GNU.html [mips-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS_UNKNOWN_LINUX_GNU.html [mips-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS_UNKNOWN_LINUX_MUSL.html [mips-unknown-linux-uclibc]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS_UNKNOWN_LINUX_UCLIBC.html [mips64-openwrt-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS64_OPENWRT_LINUX_MUSL.html [mips64-unknown-linux-gnuabi64]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS64_UNKNOWN_LINUX_GNUABI64.html [mips64-unknown-linux-muslabi64]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS64_UNKNOWN_LINUX_MUSLABI64.html [mips64el-unknown-linux-gnuabi64]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS64EL_UNKNOWN_LINUX_GNUABI64.html [mips64el-unknown-linux-muslabi64]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPS64EL_UNKNOWN_LINUX_MUSLABI64.html [mipsel-sony-psp]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSEL_SONY_PSP.html [mipsel-sony-psx]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSEL_SONY_PSX.html [mipsel-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSEL_UNKNOWN_LINUX_GNU.html [mipsel-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSEL_UNKNOWN_LINUX_MUSL.html [mipsel-unknown-linux-uclibc]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSEL_UNKNOWN_LINUX_UCLIBC.html [mipsel-unknown-none]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSEL_UNKNOWN_NONE.html [mipsisa32r6-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSISA32R6_UNKNOWN_LINUX_GNU.html [mipsisa32r6el-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSISA32R6EL_UNKNOWN_LINUX_GNU.html [mipsisa64r6-unknown-linux-gnuabi64]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSISA64R6_UNKNOWN_LINUX_GNUABI64.html [mipsisa64r6el-unknown-linux-gnuabi64]: https://docs.rs/platforms/latest/platforms/platform/constant.MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64.html [msp430-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.MSP430_NONE_ELF.html [nvptx64-nvidia-cuda]: https://docs.rs/platforms/latest/platforms/platform/constant.NVPTX64_NVIDIA_CUDA.html [powerpc-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_UNKNOWN_FREEBSD.html [powerpc-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_UNKNOWN_LINUX_GNU.html [powerpc-unknown-linux-gnuspe]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_UNKNOWN_LINUX_GNUSPE.html [powerpc-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_UNKNOWN_LINUX_MUSL.html [powerpc-unknown-netbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_UNKNOWN_NETBSD.html [powerpc-unknown-openbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_UNKNOWN_OPENBSD.html [powerpc-wrs-vxworks]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_WRS_VXWORKS.html [powerpc-wrs-vxworks-spe]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC_WRS_VXWORKS_SPE.html [powerpc64-ibm-aix]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64_IBM_AIX.html [powerpc64-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64_UNKNOWN_FREEBSD.html [powerpc64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64_UNKNOWN_LINUX_GNU.html [powerpc64-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64_UNKNOWN_LINUX_MUSL.html [powerpc64-unknown-openbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64_UNKNOWN_OPENBSD.html [powerpc64-wrs-vxworks]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64_WRS_VXWORKS.html [powerpc64le-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64LE_UNKNOWN_FREEBSD.html [powerpc64le-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64LE_UNKNOWN_LINUX_GNU.html [powerpc64le-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.POWERPC64LE_UNKNOWN_LINUX_MUSL.html [riscv32gc-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32GC_UNKNOWN_LINUX_GNU.html [riscv32gc-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32GC_UNKNOWN_LINUX_MUSL.html [riscv32i-unknown-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32I_UNKNOWN_NONE_ELF.html [riscv32im-unknown-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32IM_UNKNOWN_NONE_ELF.html [riscv32imac-esp-espidf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32IMAC_ESP_ESPIDF.html [riscv32imac-unknown-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32IMAC_UNKNOWN_NONE_ELF.html [riscv32imac-unknown-xous-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32IMAC_UNKNOWN_XOUS_ELF.html [riscv32imc-esp-espidf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32IMC_ESP_ESPIDF.html [riscv32imc-unknown-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV32IMC_UNKNOWN_NONE_ELF.html [riscv64-linux-android]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64_LINUX_ANDROID.html [riscv64gc-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_FREEBSD.html [riscv64gc-unknown-fuchsia]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_FUCHSIA.html [riscv64gc-unknown-hermit]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_HERMIT.html [riscv64gc-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_LINUX_GNU.html [riscv64gc-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_LINUX_MUSL.html [riscv64gc-unknown-netbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_NETBSD.html [riscv64gc-unknown-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_NONE_ELF.html [riscv64gc-unknown-openbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64GC_UNKNOWN_OPENBSD.html [riscv64imac-unknown-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.RISCV64IMAC_UNKNOWN_NONE_ELF.html [s390x-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.S390X_UNKNOWN_LINUX_GNU.html [s390x-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.S390X_UNKNOWN_LINUX_MUSL.html [sparc-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.SPARC_UNKNOWN_LINUX_GNU.html [sparc-unknown-none-elf]: https://docs.rs/platforms/latest/platforms/platform/constant.SPARC_UNKNOWN_NONE_ELF.html [sparc64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.SPARC64_UNKNOWN_LINUX_GNU.html [sparc64-unknown-netbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.SPARC64_UNKNOWN_NETBSD.html [sparc64-unknown-openbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.SPARC64_UNKNOWN_OPENBSD.html [sparcv9-sun-solaris]: https://docs.rs/platforms/latest/platforms/platform/constant.SPARCV9_SUN_SOLARIS.html [thumbv4t-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV4T_NONE_EABI.html [thumbv5te-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV5TE_NONE_EABI.html [thumbv6m-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV6M_NONE_EABI.html [thumbv7a-pc-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7A_PC_WINDOWS_MSVC.html [thumbv7a-uwp-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7A_UWP_WINDOWS_MSVC.html [thumbv7em-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7EM_NONE_EABI.html [thumbv7em-none-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7EM_NONE_EABIHF.html [thumbv7m-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7M_NONE_EABI.html [thumbv7neon-linux-androideabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7NEON_LINUX_ANDROIDEABI.html [thumbv7neon-unknown-linux-gnueabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7NEON_UNKNOWN_LINUX_GNUEABIHF.html [thumbv7neon-unknown-linux-musleabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV7NEON_UNKNOWN_LINUX_MUSLEABIHF.html [thumbv8m.base-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV8M.BASE_NONE_EABI.html [thumbv8m.main-none-eabi]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV8M.MAIN_NONE_EABI.html [thumbv8m.main-none-eabihf]: https://docs.rs/platforms/latest/platforms/platform/constant.THUMBV8M.MAIN_NONE_EABIHF.html [wasm32-unknown-emscripten]: https://docs.rs/platforms/latest/platforms/platform/constant.WASM32_UNKNOWN_EMSCRIPTEN.html [wasm32-unknown-unknown]: https://docs.rs/platforms/latest/platforms/platform/constant.WASM32_UNKNOWN_UNKNOWN.html [wasm32-wasi]: https://docs.rs/platforms/latest/platforms/platform/constant.WASM32_WASI.html [wasm32-wasi-preview1-threads]: https://docs.rs/platforms/latest/platforms/platform/constant.WASM32_WASI_PREVIEW1_THREADS.html [wasm64-unknown-unknown]: https://docs.rs/platforms/latest/platforms/platform/constant.WASM64_UNKNOWN_UNKNOWN.html [x86_64-apple-darwin]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_APPLE_DARWIN.html [x86_64-apple-ios]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_APPLE_IOS.html [x86_64-apple-ios-macabi]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_APPLE_IOS_MACABI.html [x86_64-apple-tvos]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_APPLE_TVOS.html [x86_64-apple-watchos-sim]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_APPLE_WATCHOS_SIM.html [x86_64-fortanix-unknown-sgx]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_FORTANIX_UNKNOWN_SGX.html [x86_64-fuchsia]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_FUCHSIA.html [x86_64-linux-android]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_LINUX_ANDROID.html [x86_64-pc-nto-qnx710]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_PC_NTO_QNX710.html [x86_64-pc-solaris]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_PC_SOLARIS.html [x86_64-pc-windows-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_PC_WINDOWS_GNU.html [x86_64-pc-windows-gnullvm]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_PC_WINDOWS_GNULLVM.html [x86_64-pc-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_PC_WINDOWS_MSVC.html [x86_64-sun-solaris]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_SUN_SOLARIS.html [x86_64-unikraft-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNIKRAFT_LINUX_MUSL.html [x86_64-unknown-dragonfly]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_DRAGONFLY.html [x86_64-unknown-freebsd]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_FREEBSD.html [x86_64-unknown-fuchsia]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_FUCHSIA.html [x86_64-unknown-haiku]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_HAIKU.html [x86_64-unknown-hermit]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_HERMIT.html [x86_64-unknown-illumos]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_ILLUMOS.html [x86_64-unknown-l4re-uclibc]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_L4RE_UCLIBC.html [x86_64-unknown-linux-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_LINUX_GNU.html [x86_64-unknown-linux-gnux32]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_LINUX_GNUX32.html [x86_64-unknown-linux-musl]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_LINUX_MUSL.html [x86_64-unknown-linux-ohos]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_LINUX_OHOS.html [x86_64-unknown-netbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_NETBSD.html [x86_64-unknown-none]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_NONE.html [x86_64-unknown-openbsd]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_OPENBSD.html [x86_64-unknown-redox]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_REDOX.html [x86_64-unknown-uefi]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UNKNOWN_UEFI.html [x86_64-uwp-windows-gnu]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UWP_WINDOWS_GNU.html [x86_64-uwp-windows-msvc]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_UWP_WINDOWS_MSVC.html [x86_64-wrs-vxworks]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64_WRS_VXWORKS.html [x86_64h-apple-darwin]: https://docs.rs/platforms/latest/platforms/platform/constant.X86_64H_APPLE_DARWIN.html platforms-3.1.2/src/error.rs000064400000000000000000000004761046102023000141330ustar 00000000000000//! Error type use core::fmt::{self, Display}; /// Error type #[derive(Clone, Debug, PartialEq, Eq)] pub struct Error; impl Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str("platforms error") } } #[cfg(feature = "std")] impl std::error::Error for Error {} platforms-3.1.2/src/lib.rs000064400000000000000000000017011046102023000135400ustar 00000000000000//! Rust platform registry: provides programmatic access to information about valid Rust platforms //! //! This crate provides an interface to the platform data canonically sourced //! from the Rust compiler: //! //! //! //! ## Minimum Supported Rust Version //! //! Rust **1.40** or higher. //! //! Minimum supported Rust version can be changed in the future, but it will be //! done with a minor version bump. #![no_std] #![doc(html_logo_url = "https://raw.githubusercontent.com/RustSec/logos/main/rustsec-logo-lg.png")] #![forbid(unsafe_code)] #![warn(missing_docs, unused_qualifications, rust_2018_idioms)] #[cfg(feature = "std")] extern crate std; pub(crate) mod error; pub mod platform; pub mod target; pub use crate::{ error::Error, platform::{Platform, Tier}, target::{Arch, Endian, Env, PointerWidth, OS}, }; #[cfg(feature = "std")] pub use crate::platform::PlatformReq; platforms-3.1.2/src/platform/platforms.rs000064400000000000000000002312231046102023000166310ustar 00000000000000//! The list of targets. // Note: this file is auto-generated. Do not edit it manually! // If you need to referesh it, re-run the generator included in the source tree. // Comments on targets are sourced from // https://doc.rust-lang.org/nightly/rustc/platform-support.html // and some of the more obscure targets do not have a comment on them #![allow(missing_docs)] use crate::{ platform::{Platform, Tier}, target::{Arch, Endian, Env, PointerWidth, OS}, }; /// The list of all targets recognized by the Rust compiler pub(crate) const ALL: &[Platform] = &[ AARCH64_APPLE_DARWIN, AARCH64_APPLE_IOS, AARCH64_APPLE_IOS_MACABI, AARCH64_APPLE_IOS_SIM, AARCH64_APPLE_TVOS, AARCH64_APPLE_WATCHOS_SIM, AARCH64_FUCHSIA, AARCH64_KMC_SOLID_ASP3, AARCH64_LINUX_ANDROID, AARCH64_NINTENDO_SWITCH_FREESTANDING, AARCH64_PC_WINDOWS_GNULLVM, AARCH64_PC_WINDOWS_MSVC, AARCH64_UNKNOWN_FREEBSD, AARCH64_UNKNOWN_FUCHSIA, AARCH64_UNKNOWN_HERMIT, AARCH64_UNKNOWN_LINUX_GNU, AARCH64_UNKNOWN_LINUX_GNU_ILP32, AARCH64_UNKNOWN_LINUX_MUSL, AARCH64_UNKNOWN_LINUX_OHOS, AARCH64_UNKNOWN_NETBSD, AARCH64_UNKNOWN_NONE, AARCH64_UNKNOWN_NONE_SOFTFLOAT, AARCH64_UNKNOWN_NTO_QNX710, AARCH64_UNKNOWN_OPENBSD, AARCH64_UNKNOWN_REDOX, AARCH64_UNKNOWN_TEEOS, AARCH64_UNKNOWN_UEFI, AARCH64_UWP_WINDOWS_MSVC, AARCH64_WRS_VXWORKS, AARCH64_BE_UNKNOWN_LINUX_GNU, AARCH64_BE_UNKNOWN_LINUX_GNU_ILP32, AARCH64_BE_UNKNOWN_NETBSD, ARM_LINUX_ANDROIDEABI, ARM_UNKNOWN_LINUX_GNUEABI, ARM_UNKNOWN_LINUX_GNUEABIHF, ARM_UNKNOWN_LINUX_MUSLEABI, ARM_UNKNOWN_LINUX_MUSLEABIHF, ARM64_32_APPLE_WATCHOS, ARMEB_UNKNOWN_LINUX_GNUEABI, ARMEBV7R_NONE_EABI, ARMEBV7R_NONE_EABIHF, ARMV4T_NONE_EABI, ARMV4T_UNKNOWN_LINUX_GNUEABI, ARMV5TE_NONE_EABI, ARMV5TE_UNKNOWN_LINUX_GNUEABI, ARMV5TE_UNKNOWN_LINUX_MUSLEABI, ARMV5TE_UNKNOWN_LINUX_UCLIBCEABI, ARMV6_UNKNOWN_FREEBSD, ARMV6_UNKNOWN_NETBSD_EABIHF, ARMV6K_NINTENDO_3DS, ARMV7_APPLE_IOS, ARMV7_LINUX_ANDROIDEABI, ARMV7_SONY_VITA_NEWLIBEABIHF, ARMV7_UNKNOWN_FREEBSD, ARMV7_UNKNOWN_LINUX_GNUEABI, ARMV7_UNKNOWN_LINUX_GNUEABIHF, ARMV7_UNKNOWN_LINUX_MUSLEABI, ARMV7_UNKNOWN_LINUX_MUSLEABIHF, ARMV7_UNKNOWN_LINUX_OHOS, ARMV7_UNKNOWN_LINUX_UCLIBCEABI, ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF, ARMV7_UNKNOWN_NETBSD_EABIHF, ARMV7_WRS_VXWORKS_EABIHF, ARMV7A_KMC_SOLID_ASP3_EABI, ARMV7A_KMC_SOLID_ASP3_EABIHF, ARMV7A_NONE_EABI, ARMV7A_NONE_EABIHF, ARMV7K_APPLE_WATCHOS, ARMV7R_NONE_EABI, ARMV7R_NONE_EABIHF, ARMV7S_APPLE_IOS, ASMJS_UNKNOWN_EMSCRIPTEN, AVR_UNKNOWN_GNU_ATMEGA328, BPFEB_UNKNOWN_NONE, BPFEL_UNKNOWN_NONE, CSKY_UNKNOWN_LINUX_GNUABIV2, HEXAGON_UNKNOWN_LINUX_MUSL, I386_APPLE_IOS, I586_PC_NTO_QNX700, I586_PC_WINDOWS_MSVC, I586_UNKNOWN_LINUX_GNU, I586_UNKNOWN_LINUX_MUSL, I686_APPLE_DARWIN, I686_LINUX_ANDROID, I686_PC_WINDOWS_GNU, I686_PC_WINDOWS_MSVC, I686_UNKNOWN_FREEBSD, I686_UNKNOWN_HAIKU, I686_UNKNOWN_LINUX_GNU, I686_UNKNOWN_LINUX_MUSL, I686_UNKNOWN_NETBSD, I686_UNKNOWN_OPENBSD, I686_UNKNOWN_UEFI, I686_UWP_WINDOWS_GNU, I686_UWP_WINDOWS_MSVC, I686_WRS_VXWORKS, LOONGARCH64_UNKNOWN_LINUX_GNU, LOONGARCH64_UNKNOWN_NONE, LOONGARCH64_UNKNOWN_NONE_SOFTFLOAT, M68K_UNKNOWN_LINUX_GNU, MIPS_UNKNOWN_LINUX_GNU, MIPS_UNKNOWN_LINUX_MUSL, MIPS_UNKNOWN_LINUX_UCLIBC, MIPS64_OPENWRT_LINUX_MUSL, MIPS64_UNKNOWN_LINUX_GNUABI64, MIPS64_UNKNOWN_LINUX_MUSLABI64, MIPS64EL_UNKNOWN_LINUX_GNUABI64, MIPS64EL_UNKNOWN_LINUX_MUSLABI64, MIPSEL_SONY_PSP, MIPSEL_SONY_PSX, MIPSEL_UNKNOWN_LINUX_GNU, MIPSEL_UNKNOWN_LINUX_MUSL, MIPSEL_UNKNOWN_LINUX_UCLIBC, MIPSEL_UNKNOWN_NONE, MIPSISA32R6_UNKNOWN_LINUX_GNU, MIPSISA32R6EL_UNKNOWN_LINUX_GNU, MIPSISA64R6_UNKNOWN_LINUX_GNUABI64, MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64, MSP430_NONE_ELF, NVPTX64_NVIDIA_CUDA, POWERPC_UNKNOWN_FREEBSD, POWERPC_UNKNOWN_LINUX_GNU, POWERPC_UNKNOWN_LINUX_GNUSPE, POWERPC_UNKNOWN_LINUX_MUSL, POWERPC_UNKNOWN_NETBSD, POWERPC_UNKNOWN_OPENBSD, POWERPC_WRS_VXWORKS, POWERPC_WRS_VXWORKS_SPE, POWERPC64_IBM_AIX, POWERPC64_UNKNOWN_FREEBSD, POWERPC64_UNKNOWN_LINUX_GNU, POWERPC64_UNKNOWN_LINUX_MUSL, POWERPC64_UNKNOWN_OPENBSD, POWERPC64_WRS_VXWORKS, POWERPC64LE_UNKNOWN_FREEBSD, POWERPC64LE_UNKNOWN_LINUX_GNU, POWERPC64LE_UNKNOWN_LINUX_MUSL, RISCV32GC_UNKNOWN_LINUX_GNU, RISCV32GC_UNKNOWN_LINUX_MUSL, RISCV32I_UNKNOWN_NONE_ELF, RISCV32IM_UNKNOWN_NONE_ELF, RISCV32IMAC_ESP_ESPIDF, RISCV32IMAC_UNKNOWN_NONE_ELF, RISCV32IMAC_UNKNOWN_XOUS_ELF, RISCV32IMC_ESP_ESPIDF, RISCV32IMC_UNKNOWN_NONE_ELF, RISCV64_LINUX_ANDROID, RISCV64GC_UNKNOWN_FREEBSD, RISCV64GC_UNKNOWN_FUCHSIA, RISCV64GC_UNKNOWN_HERMIT, RISCV64GC_UNKNOWN_LINUX_GNU, RISCV64GC_UNKNOWN_LINUX_MUSL, RISCV64GC_UNKNOWN_NETBSD, RISCV64GC_UNKNOWN_NONE_ELF, RISCV64GC_UNKNOWN_OPENBSD, RISCV64IMAC_UNKNOWN_NONE_ELF, S390X_UNKNOWN_LINUX_GNU, S390X_UNKNOWN_LINUX_MUSL, SPARC_UNKNOWN_LINUX_GNU, SPARC_UNKNOWN_NONE_ELF, SPARC64_UNKNOWN_LINUX_GNU, SPARC64_UNKNOWN_NETBSD, SPARC64_UNKNOWN_OPENBSD, SPARCV9_SUN_SOLARIS, THUMBV4T_NONE_EABI, THUMBV5TE_NONE_EABI, THUMBV6M_NONE_EABI, THUMBV7A_PC_WINDOWS_MSVC, THUMBV7A_UWP_WINDOWS_MSVC, THUMBV7EM_NONE_EABI, THUMBV7EM_NONE_EABIHF, THUMBV7M_NONE_EABI, THUMBV7NEON_LINUX_ANDROIDEABI, THUMBV7NEON_UNKNOWN_LINUX_GNUEABIHF, THUMBV7NEON_UNKNOWN_LINUX_MUSLEABIHF, THUMBV8M_BASE_NONE_EABI, THUMBV8M_MAIN_NONE_EABI, THUMBV8M_MAIN_NONE_EABIHF, WASM32_UNKNOWN_EMSCRIPTEN, WASM32_UNKNOWN_UNKNOWN, WASM32_WASI, WASM32_WASI_PREVIEW1_THREADS, WASM64_UNKNOWN_UNKNOWN, X86_64_APPLE_DARWIN, X86_64_APPLE_IOS, X86_64_APPLE_IOS_MACABI, X86_64_APPLE_TVOS, X86_64_APPLE_WATCHOS_SIM, X86_64_FORTANIX_UNKNOWN_SGX, X86_64_FUCHSIA, X86_64_LINUX_ANDROID, X86_64_PC_NTO_QNX710, X86_64_PC_SOLARIS, X86_64_PC_WINDOWS_GNU, X86_64_PC_WINDOWS_GNULLVM, X86_64_PC_WINDOWS_MSVC, X86_64_SUN_SOLARIS, X86_64_UNIKRAFT_LINUX_MUSL, X86_64_UNKNOWN_DRAGONFLY, X86_64_UNKNOWN_FREEBSD, X86_64_UNKNOWN_FUCHSIA, X86_64_UNKNOWN_HAIKU, X86_64_UNKNOWN_HERMIT, X86_64_UNKNOWN_ILLUMOS, X86_64_UNKNOWN_L4RE_UCLIBC, X86_64_UNKNOWN_LINUX_GNU, X86_64_UNKNOWN_LINUX_GNUX32, X86_64_UNKNOWN_LINUX_MUSL, X86_64_UNKNOWN_LINUX_OHOS, X86_64_UNKNOWN_NETBSD, X86_64_UNKNOWN_NONE, X86_64_UNKNOWN_OPENBSD, X86_64_UNKNOWN_REDOX, X86_64_UNKNOWN_UEFI, X86_64_UWP_WINDOWS_GNU, X86_64_UWP_WINDOWS_MSVC, X86_64_WRS_VXWORKS, X86_64H_APPLE_DARWIN, ]; /// ARM64 macOS (11.0+, Big Sur+) pub(crate) const AARCH64_APPLE_DARWIN: Platform = Platform { target_triple: "aarch64-apple-darwin", target_arch: Arch::AArch64, target_os: OS::MacOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// ARM64 iOS pub(crate) const AARCH64_APPLE_IOS: Platform = Platform { target_triple: "aarch64-apple-ios", target_arch: Arch::AArch64, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// Apple Catalyst on ARM64 pub(crate) const AARCH64_APPLE_IOS_MACABI: Platform = Platform { target_triple: "aarch64-apple-ios-macabi", target_arch: Arch::AArch64, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// Apple iOS Simulator on ARM64 pub(crate) const AARCH64_APPLE_IOS_SIM: Platform = Platform { target_triple: "aarch64-apple-ios-sim", target_arch: Arch::AArch64, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// ARM64 tvOS pub(crate) const AARCH64_APPLE_TVOS: Platform = Platform { target_triple: "aarch64-apple-tvos", target_arch: Arch::AArch64, target_os: OS::TvOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Apple WatchOS Simulator pub(crate) const AARCH64_APPLE_WATCHOS_SIM: Platform = Platform { target_triple: "aarch64-apple-watchos-sim", target_arch: Arch::AArch64, target_os: OS::WatchOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// Alias for `aarch64-unknown-fuchsia` pub(crate) const AARCH64_FUCHSIA: Platform = Platform { target_triple: "aarch64-fuchsia", target_arch: Arch::AArch64, target_os: OS::Fuchsia, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// ARM64 SOLID with TOPPERS/ASP3 pub(crate) const AARCH64_KMC_SOLID_ASP3: Platform = Platform { target_triple: "aarch64-kmc-solid_asp3", target_arch: Arch::AArch64, target_os: OS::SolidAsp3, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Android pub(crate) const AARCH64_LINUX_ANDROID: Platform = Platform { target_triple: "aarch64-linux-android", target_arch: Arch::AArch64, target_os: OS::Android, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// ARM64 Nintendo Switch, Horizon pub(crate) const AARCH64_NINTENDO_SWITCH_FREESTANDING: Platform = Platform { target_triple: "aarch64-nintendo-switch-freestanding", target_arch: Arch::AArch64, target_os: OS::Horizon, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; pub(crate) const AARCH64_PC_WINDOWS_GNULLVM: Platform = Platform { target_triple: "aarch64-pc-windows-gnullvm", target_arch: Arch::AArch64, target_os: OS::Windows, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Windows MSVC pub(crate) const AARCH64_PC_WINDOWS_MSVC: Platform = Platform { target_triple: "aarch64-pc-windows-msvc", target_arch: Arch::AArch64, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// ARM64 FreeBSD pub(crate) const AARCH64_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "aarch64-unknown-freebsd", target_arch: Arch::AArch64, target_os: OS::FreeBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Fuchsia pub(crate) const AARCH64_UNKNOWN_FUCHSIA: Platform = Platform { target_triple: "aarch64-unknown-fuchsia", target_arch: Arch::AArch64, target_os: OS::Fuchsia, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// ARM64 Hermit pub(crate) const AARCH64_UNKNOWN_HERMIT: Platform = Platform { target_triple: "aarch64-unknown-hermit", target_arch: Arch::AArch64, target_os: OS::Hermit, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Linux (kernel 4.1, glibc 2.17+) [^missing-stack-probes] pub(crate) const AARCH64_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "aarch64-unknown-linux-gnu", target_arch: Arch::AArch64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::One, }; /// ARM64 Linux (ILP32 ABI) pub(crate) const AARCH64_UNKNOWN_LINUX_GNU_ILP32: Platform = Platform { target_triple: "aarch64-unknown-linux-gnu_ilp32", target_arch: Arch::AArch64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARM64 Linux with MUSL pub(crate) const AARCH64_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "aarch64-unknown-linux-musl", target_arch: Arch::AArch64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const AARCH64_UNKNOWN_LINUX_OHOS: Platform = Platform { target_triple: "aarch64-unknown-linux-ohos", target_arch: Arch::AArch64, target_os: OS::Linux, target_env: Env::OhOS, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 NetBSD pub(crate) const AARCH64_UNKNOWN_NETBSD: Platform = Platform { target_triple: "aarch64-unknown-netbsd", target_arch: Arch::AArch64, target_os: OS::NetBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// Bare ARM64, hardfloat pub(crate) const AARCH64_UNKNOWN_NONE: Platform = Platform { target_triple: "aarch64-unknown-none", target_arch: Arch::AArch64, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// Bare ARM64, softfloat pub(crate) const AARCH64_UNKNOWN_NONE_SOFTFLOAT: Platform = Platform { target_triple: "aarch64-unknown-none-softfloat", target_arch: Arch::AArch64, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const AARCH64_UNKNOWN_NTO_QNX710: Platform = Platform { target_triple: "aarch64-unknown-nto-qnx710", target_arch: Arch::AArch64, target_os: OS::Nto, target_env: Env::Nto71, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 OpenBSD pub(crate) const AARCH64_UNKNOWN_OPENBSD: Platform = Platform { target_triple: "aarch64-unknown-openbsd", target_arch: Arch::AArch64, target_os: OS::OpenBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Redox OS pub(crate) const AARCH64_UNKNOWN_REDOX: Platform = Platform { target_triple: "aarch64-unknown-redox", target_arch: Arch::AArch64, target_os: OS::Redox, target_env: Env::Relibc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; pub(crate) const AARCH64_UNKNOWN_TEEOS: Platform = Platform { target_triple: "aarch64-unknown-teeos", target_arch: Arch::AArch64, target_os: OS::TeeOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 UEFI pub(crate) const AARCH64_UNKNOWN_UEFI: Platform = Platform { target_triple: "aarch64-unknown-uefi", target_arch: Arch::AArch64, target_os: OS::Uefi, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const AARCH64_UWP_WINDOWS_MSVC: Platform = Platform { target_triple: "aarch64-uwp-windows-msvc", target_arch: Arch::AArch64, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; pub(crate) const AARCH64_WRS_VXWORKS: Platform = Platform { target_triple: "aarch64-wrs-vxworks", target_arch: Arch::AArch64, target_os: OS::VxWorks, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Linux (big-endian) pub(crate) const AARCH64_BE_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "aarch64_be-unknown-linux-gnu", target_arch: Arch::AArch64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARM64 Linux (big-endian, ILP32 ABI) pub(crate) const AARCH64_BE_UNKNOWN_LINUX_GNU_ILP32: Platform = Platform { target_triple: "aarch64_be-unknown-linux-gnu_ilp32", target_arch: Arch::AArch64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARM64 NetBSD (big-endian) pub(crate) const AARCH64_BE_UNKNOWN_NETBSD: Platform = Platform { target_triple: "aarch64_be-unknown-netbsd", target_arch: Arch::AArch64, target_os: OS::NetBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// ARMv6 Android pub(crate) const ARM_LINUX_ANDROIDEABI: Platform = Platform { target_triple: "arm-linux-androideabi", target_arch: Arch::Arm, target_os: OS::Android, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv6 Linux (kernel 3.2, glibc 2.17) pub(crate) const ARM_UNKNOWN_LINUX_GNUEABI: Platform = Platform { target_triple: "arm-unknown-linux-gnueabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv6 Linux, hardfloat (kernel 3.2, glibc 2.17) pub(crate) const ARM_UNKNOWN_LINUX_GNUEABIHF: Platform = Platform { target_triple: "arm-unknown-linux-gnueabihf", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv6 Linux with MUSL pub(crate) const ARM_UNKNOWN_LINUX_MUSLEABI: Platform = Platform { target_triple: "arm-unknown-linux-musleabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv6 Linux with MUSL, hardfloat pub(crate) const ARM_UNKNOWN_LINUX_MUSLEABIHF: Platform = Platform { target_triple: "arm-unknown-linux-musleabihf", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARM Apple WatchOS 64-bit with 32-bit pointers pub(crate) const ARM64_32_APPLE_WATCHOS: Platform = Platform { target_triple: "arm64_32-apple-watchos", target_arch: Arch::AArch64, target_os: OS::WatchOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARM BE8 the default ARM big-endian architecture since [ARMv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). pub(crate) const ARMEB_UNKNOWN_LINUX_GNUEABI: Platform = Platform { target_triple: "armeb-unknown-linux-gnueabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare ARMv7-R, Big Endian pub(crate) const ARMEBV7R_NONE_EABI: Platform = Platform { target_triple: "armebv7r-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMv7-R, Big Endian, hardfloat pub(crate) const ARMEBV7R_NONE_EABIHF: Platform = Platform { target_triple: "armebv7r-none-eabihf", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMv4T pub(crate) const ARMV4T_NONE_EABI: Platform = Platform { target_triple: "armv4t-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv4T Linux pub(crate) const ARMV4T_UNKNOWN_LINUX_GNUEABI: Platform = Platform { target_triple: "armv4t-unknown-linux-gnueabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare ARMv5TE pub(crate) const ARMV5TE_NONE_EABI: Platform = Platform { target_triple: "armv5te-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv5TE Linux (kernel 4.4, glibc 2.23) pub(crate) const ARMV5TE_UNKNOWN_LINUX_GNUEABI: Platform = Platform { target_triple: "armv5te-unknown-linux-gnueabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv5TE Linux with MUSL pub(crate) const ARMV5TE_UNKNOWN_LINUX_MUSLEABI: Platform = Platform { target_triple: "armv5te-unknown-linux-musleabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv5TE Linux with uClibc pub(crate) const ARMV5TE_UNKNOWN_LINUX_UCLIBCEABI: Platform = Platform { target_triple: "armv5te-unknown-linux-uclibceabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::UClibc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv6 FreeBSD pub(crate) const ARMV6_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "armv6-unknown-freebsd", target_arch: Arch::Arm, target_os: OS::FreeBSD, target_env: Env::Gnueabihf, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv6 NetBSD w/hard-float pub(crate) const ARMV6_UNKNOWN_NETBSD_EABIHF: Platform = Platform { target_triple: "armv6-unknown-netbsd-eabihf", target_arch: Arch::Arm, target_os: OS::NetBSD, target_env: Env::Eabihf, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv6K Nintendo 3DS, Horizon (Requires devkitARM toolchain) pub(crate) const ARMV6K_NINTENDO_3DS: Platform = Platform { target_triple: "armv6k-nintendo-3ds", target_arch: Arch::Arm, target_os: OS::Horizon, target_env: Env::Newlib, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A Cortex-A8 iOS pub(crate) const ARMV7_APPLE_IOS: Platform = Platform { target_triple: "armv7-apple-ios", target_arch: Arch::Arm, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A Android pub(crate) const ARMV7_LINUX_ANDROIDEABI: Platform = Platform { target_triple: "armv7-linux-androideabi", target_arch: Arch::Arm, target_os: OS::Android, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv7-A Cortex-A9 Sony PlayStation Vita (requires VITASDK toolchain) pub(crate) const ARMV7_SONY_VITA_NEWLIBEABIHF: Platform = Platform { target_triple: "armv7-sony-vita-newlibeabihf", target_arch: Arch::Arm, target_os: OS::Vita, target_env: Env::Newlib, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A FreeBSD pub(crate) const ARMV7_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "armv7-unknown-freebsd", target_arch: Arch::Arm, target_os: OS::FreeBSD, target_env: Env::Gnueabihf, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A Linux (kernel 4.15, glibc 2.27) pub(crate) const ARMV7_UNKNOWN_LINUX_GNUEABI: Platform = Platform { target_triple: "armv7-unknown-linux-gnueabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv7-A Linux, hardfloat (kernel 3.2, glibc 2.17) pub(crate) const ARMV7_UNKNOWN_LINUX_GNUEABIHF: Platform = Platform { target_triple: "armv7-unknown-linux-gnueabihf", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv7-A Linux with MUSL pub(crate) const ARMV7_UNKNOWN_LINUX_MUSLEABI: Platform = Platform { target_triple: "armv7-unknown-linux-musleabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv7-A Linux with MUSL, hardfloat pub(crate) const ARMV7_UNKNOWN_LINUX_MUSLEABIHF: Platform = Platform { target_triple: "armv7-unknown-linux-musleabihf", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; pub(crate) const ARMV7_UNKNOWN_LINUX_OHOS: Platform = Platform { target_triple: "armv7-unknown-linux-ohos", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::OhOS, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A Linux with uClibc, softfloat pub(crate) const ARMV7_UNKNOWN_LINUX_UCLIBCEABI: Platform = Platform { target_triple: "armv7-unknown-linux-uclibceabi", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::UClibc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A Linux with uClibc, hardfloat pub(crate) const ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF: Platform = Platform { target_triple: "armv7-unknown-linux-uclibceabihf", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::UClibc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A NetBSD w/hard-float pub(crate) const ARMV7_UNKNOWN_NETBSD_EABIHF: Platform = Platform { target_triple: "armv7-unknown-netbsd-eabihf", target_arch: Arch::Arm, target_os: OS::NetBSD, target_env: Env::Eabihf, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A for VxWorks pub(crate) const ARMV7_WRS_VXWORKS_EABIHF: Platform = Platform { target_triple: "armv7-wrs-vxworks-eabihf", target_arch: Arch::Arm, target_os: OS::VxWorks, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARM SOLID with TOPPERS/ASP3 pub(crate) const ARMV7A_KMC_SOLID_ASP3_EABI: Platform = Platform { target_triple: "armv7a-kmc-solid_asp3-eabi", target_arch: Arch::Arm, target_os: OS::SolidAsp3, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARM SOLID with TOPPERS/ASP3, hardfloat pub(crate) const ARMV7A_KMC_SOLID_ASP3_EABIHF: Platform = Platform { target_triple: "armv7a-kmc-solid_asp3-eabihf", target_arch: Arch::Arm, target_os: OS::SolidAsp3, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare ARMv7-A pub(crate) const ARMV7A_NONE_EABI: Platform = Platform { target_triple: "armv7a-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMv7-A, hardfloat pub(crate) const ARMV7A_NONE_EABIHF: Platform = Platform { target_triple: "armv7a-none-eabihf", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// ARMv7-A Apple WatchOS pub(crate) const ARMV7K_APPLE_WATCHOS: Platform = Platform { target_triple: "armv7k-apple-watchos", target_arch: Arch::Arm, target_os: OS::WatchOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare ARMv7-R pub(crate) const ARMV7R_NONE_EABI: Platform = Platform { target_triple: "armv7r-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMv7-R, hardfloat pub(crate) const ARMV7R_NONE_EABIHF: Platform = Platform { target_triple: "armv7r-none-eabihf", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// ARMv7-A Apple-A6 Apple iOS pub(crate) const ARMV7S_APPLE_IOS: Platform = Platform { target_triple: "armv7s-apple-ios", target_arch: Arch::Arm, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// asm.js via Emscripten pub(crate) const ASMJS_UNKNOWN_EMSCRIPTEN: Platform = Platform { target_triple: "asmjs-unknown-emscripten", target_arch: Arch::Wasm32, target_os: OS::Emscripten, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// AVR. Requires `-Z build-std=core` pub(crate) const AVR_UNKNOWN_GNU_ATMEGA328: Platform = Platform { target_triple: "avr-unknown-gnu-atmega328", target_arch: Arch::Avr, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U16, tier: Tier::Three, }; /// BPF (big endian) pub(crate) const BPFEB_UNKNOWN_NONE: Platform = Platform { target_triple: "bpfeb-unknown-none", target_arch: Arch::Bpf, target_os: OS::None, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// BPF (little endian) pub(crate) const BPFEL_UNKNOWN_NONE: Platform = Platform { target_triple: "bpfel-unknown-none", target_arch: Arch::Bpf, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// C-SKY abiv2 Linux(little endian) pub(crate) const CSKY_UNKNOWN_LINUX_GNUABIV2: Platform = Platform { target_triple: "csky-unknown-linux-gnuabiv2", target_arch: Arch::Csky, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const HEXAGON_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "hexagon-unknown-linux-musl", target_arch: Arch::Hexagon, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit x86 iOS pub(crate) const I386_APPLE_IOS: Platform = Platform { target_triple: "i386-apple-ios", target_arch: Arch::X86, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const I586_PC_NTO_QNX700: Platform = Platform { target_triple: "i586-pc-nto-qnx700", target_arch: Arch::X86, target_os: OS::Nto, target_env: Env::Nto70, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit Windows w/o SSE pub(crate) const I586_PC_WINDOWS_MSVC: Platform = Platform { target_triple: "i586-pc-windows-msvc", target_arch: Arch::X86, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17) pub(crate) const I586_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "i586-unknown-linux-gnu", target_arch: Arch::X86, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// 32-bit Linux w/o SSE, MUSL pub(crate) const I586_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "i586-unknown-linux-musl", target_arch: Arch::X86, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// 32-bit macOS (10.7+, Lion+) pub(crate) const I686_APPLE_DARWIN: Platform = Platform { target_triple: "i686-apple-darwin", target_arch: Arch::X86, target_os: OS::MacOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit x86 Android pub(crate) const I686_LINUX_ANDROID: Platform = Platform { target_triple: "i686-linux-android", target_arch: Arch::X86, target_os: OS::Android, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// 32-bit MinGW (Windows 7+) [^windows-support] pub(crate) const I686_PC_WINDOWS_GNU: Platform = Platform { target_triple: "i686-pc-windows-gnu", target_arch: Arch::X86, target_os: OS::Windows, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::One, }; /// 32-bit MSVC (Windows 7+) [^windows-support] pub(crate) const I686_PC_WINDOWS_MSVC: Platform = Platform { target_triple: "i686-pc-windows-msvc", target_arch: Arch::X86, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::One, }; /// 32-bit FreeBSD pub(crate) const I686_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "i686-unknown-freebsd", target_arch: Arch::X86, target_os: OS::FreeBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// 32-bit Haiku pub(crate) const I686_UNKNOWN_HAIKU: Platform = Platform { target_triple: "i686-unknown-haiku", target_arch: Arch::X86, target_os: OS::Haiku, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit Linux (kernel 3.2+, glibc 2.17+) pub(crate) const I686_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "i686-unknown-linux-gnu", target_arch: Arch::X86, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::One, }; /// 32-bit Linux with MUSL pub(crate) const I686_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "i686-unknown-linux-musl", target_arch: Arch::X86, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// NetBSD/i386 with SSE2 pub(crate) const I686_UNKNOWN_NETBSD: Platform = Platform { target_triple: "i686-unknown-netbsd", target_arch: Arch::X86, target_os: OS::NetBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit OpenBSD pub(crate) const I686_UNKNOWN_OPENBSD: Platform = Platform { target_triple: "i686-unknown-openbsd", target_arch: Arch::X86, target_os: OS::OpenBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit UEFI pub(crate) const I686_UNKNOWN_UEFI: Platform = Platform { target_triple: "i686-unknown-uefi", target_arch: Arch::X86, target_os: OS::Uefi, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; pub(crate) const I686_UWP_WINDOWS_GNU: Platform = Platform { target_triple: "i686-uwp-windows-gnu", target_arch: Arch::X86, target_os: OS::Windows, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const I686_UWP_WINDOWS_MSVC: Platform = Platform { target_triple: "i686-uwp-windows-msvc", target_arch: Arch::X86, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const I686_WRS_VXWORKS: Platform = Platform { target_triple: "i686-wrs-vxworks", target_arch: Arch::X86, target_os: OS::VxWorks, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// LoongArch64 Linux, LP64D ABI (kernel 5.19, glibc 2.36) pub(crate) const LOONGARCH64_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "loongarch64-unknown-linux-gnu", target_arch: Arch::Loongarch64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// LoongArch64 Bare-metal (LP64D ABI) pub(crate) const LOONGARCH64_UNKNOWN_NONE: Platform = Platform { target_triple: "loongarch64-unknown-none", target_arch: Arch::Loongarch64, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// LoongArch64 Bare-metal (LP64S ABI) pub(crate) const LOONGARCH64_UNKNOWN_NONE_SOFTFLOAT: Platform = Platform { target_triple: "loongarch64-unknown-none-softfloat", target_arch: Arch::Loongarch64, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// Motorola 680x0 Linux pub(crate) const M68K_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "m68k-unknown-linux-gnu", target_arch: Arch::M68k, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// MIPS Linux (kernel 4.4, glibc 2.23) pub(crate) const MIPS_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "mips-unknown-linux-gnu", target_arch: Arch::Mips, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// MIPS Linux with MUSL pub(crate) const MIPS_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "mips-unknown-linux-musl", target_arch: Arch::Mips, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// MIPS Linux with uClibc pub(crate) const MIPS_UNKNOWN_LINUX_UCLIBC: Platform = Platform { target_triple: "mips-unknown-linux-uclibc", target_arch: Arch::Mips, target_os: OS::Linux, target_env: Env::UClibc, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// MIPS64 for OpenWrt Linux MUSL pub(crate) const MIPS64_OPENWRT_LINUX_MUSL: Platform = Platform { target_triple: "mips64-openwrt-linux-musl", target_arch: Arch::Mips64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// MIPS64 Linux, n64 ABI (kernel 4.4, glibc 2.23) pub(crate) const MIPS64_UNKNOWN_LINUX_GNUABI64: Platform = Platform { target_triple: "mips64-unknown-linux-gnuabi64", target_arch: Arch::Mips64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// MIPS64 Linux, n64 ABI, MUSL pub(crate) const MIPS64_UNKNOWN_LINUX_MUSLABI64: Platform = Platform { target_triple: "mips64-unknown-linux-muslabi64", target_arch: Arch::Mips64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// MIPS64 (LE) Linux, n64 ABI (kernel 4.4, glibc 2.23) pub(crate) const MIPS64EL_UNKNOWN_LINUX_GNUABI64: Platform = Platform { target_triple: "mips64el-unknown-linux-gnuabi64", target_arch: Arch::Mips64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// MIPS64 (LE) Linux, n64 ABI, MUSL pub(crate) const MIPS64EL_UNKNOWN_LINUX_MUSLABI64: Platform = Platform { target_triple: "mips64el-unknown-linux-muslabi64", target_arch: Arch::Mips64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// MIPS (LE) Sony PlayStation Portable (PSP) pub(crate) const MIPSEL_SONY_PSP: Platform = Platform { target_triple: "mipsel-sony-psp", target_arch: Arch::Mips, target_os: OS::Psp, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// MIPS (LE) Sony PlayStation 1 (PSX) pub(crate) const MIPSEL_SONY_PSX: Platform = Platform { target_triple: "mipsel-sony-psx", target_arch: Arch::Mips, target_os: OS::None, target_env: Env::Psx, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// MIPS (LE) Linux (kernel 4.4, glibc 2.23) pub(crate) const MIPSEL_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "mipsel-unknown-linux-gnu", target_arch: Arch::Mips, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// MIPS (LE) Linux with MUSL pub(crate) const MIPSEL_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "mipsel-unknown-linux-musl", target_arch: Arch::Mips, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// MIPS (LE) Linux with uClibc pub(crate) const MIPSEL_UNKNOWN_LINUX_UCLIBC: Platform = Platform { target_triple: "mipsel-unknown-linux-uclibc", target_arch: Arch::Mips, target_os: OS::Linux, target_env: Env::UClibc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare MIPS (LE) softfloat pub(crate) const MIPSEL_UNKNOWN_NONE: Platform = Platform { target_triple: "mipsel-unknown-none", target_arch: Arch::Mips, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit MIPS Release 6 Big Endian pub(crate) const MIPSISA32R6_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "mipsisa32r6-unknown-linux-gnu", target_arch: Arch::Mips32r6, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 32-bit MIPS Release 6 Little Endian pub(crate) const MIPSISA32R6EL_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "mipsisa32r6el-unknown-linux-gnu", target_arch: Arch::Mips32r6, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 64-bit MIPS Release 6 Big Endian pub(crate) const MIPSISA64R6_UNKNOWN_LINUX_GNUABI64: Platform = Platform { target_triple: "mipsisa64r6-unknown-linux-gnuabi64", target_arch: Arch::Mips64r6, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit MIPS Release 6 Little Endian pub(crate) const MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64: Platform = Platform { target_triple: "mipsisa64r6el-unknown-linux-gnuabi64", target_arch: Arch::Mips64r6, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 16-bit MSP430 microcontrollers pub(crate) const MSP430_NONE_ELF: Platform = Platform { target_triple: "msp430-none-elf", target_arch: Arch::Msp430, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U16, tier: Tier::Three, }; /// --emit=asm generates PTX code that [runs on NVIDIA GPUs] pub(crate) const NVPTX64_NVIDIA_CUDA: Platform = Platform { target_triple: "nvptx64-nvidia-cuda", target_arch: Arch::Nvptx64, target_os: OS::Cuda, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// PowerPC FreeBSD pub(crate) const POWERPC_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "powerpc-unknown-freebsd", target_arch: Arch::PowerPc, target_os: OS::FreeBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// PowerPC Linux (kernel 3.2, glibc 2.17) pub(crate) const POWERPC_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "powerpc-unknown-linux-gnu", target_arch: Arch::PowerPc, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// PowerPC SPE Linux pub(crate) const POWERPC_UNKNOWN_LINUX_GNUSPE: Platform = Platform { target_triple: "powerpc-unknown-linux-gnuspe", target_arch: Arch::PowerPc, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const POWERPC_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "powerpc-unknown-linux-musl", target_arch: Arch::PowerPc, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// NetBSD 32-bit powerpc systems pub(crate) const POWERPC_UNKNOWN_NETBSD: Platform = Platform { target_triple: "powerpc-unknown-netbsd", target_arch: Arch::PowerPc, target_os: OS::NetBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const POWERPC_UNKNOWN_OPENBSD: Platform = Platform { target_triple: "powerpc-unknown-openbsd", target_arch: Arch::PowerPc, target_os: OS::OpenBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const POWERPC_WRS_VXWORKS: Platform = Platform { target_triple: "powerpc-wrs-vxworks", target_arch: Arch::PowerPc, target_os: OS::VxWorks, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const POWERPC_WRS_VXWORKS_SPE: Platform = Platform { target_triple: "powerpc-wrs-vxworks-spe", target_arch: Arch::PowerPc, target_os: OS::VxWorks, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// 64-bit AIX (7.2 and newer) pub(crate) const POWERPC64_IBM_AIX: Platform = Platform { target_triple: "powerpc64-ibm-aix", target_arch: Arch::PowerPc64, target_os: OS::Aix, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// PPC64 FreeBSD (ELFv1 and ELFv2) pub(crate) const POWERPC64_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "powerpc64-unknown-freebsd", target_arch: Arch::PowerPc64, target_os: OS::FreeBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// PPC64 Linux (kernel 3.2, glibc 2.17) pub(crate) const POWERPC64_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "powerpc64-unknown-linux-gnu", target_arch: Arch::PowerPc64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const POWERPC64_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "powerpc64-unknown-linux-musl", target_arch: Arch::PowerPc64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// OpenBSD/powerpc64 pub(crate) const POWERPC64_UNKNOWN_OPENBSD: Platform = Platform { target_triple: "powerpc64-unknown-openbsd", target_arch: Arch::PowerPc64, target_os: OS::OpenBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; pub(crate) const POWERPC64_WRS_VXWORKS: Platform = Platform { target_triple: "powerpc64-wrs-vxworks", target_arch: Arch::PowerPc64, target_os: OS::VxWorks, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// PPC64LE FreeBSD pub(crate) const POWERPC64LE_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "powerpc64le-unknown-freebsd", target_arch: Arch::PowerPc64, target_os: OS::FreeBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// PPC64LE Linux (kernel 3.10, glibc 2.17) pub(crate) const POWERPC64LE_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "powerpc64le-unknown-linux-gnu", target_arch: Arch::PowerPc64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const POWERPC64LE_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "powerpc64le-unknown-linux-musl", target_arch: Arch::PowerPc64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// RISC-V Linux (kernel 5.4, glibc 2.33) pub(crate) const RISCV32GC_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "riscv32gc-unknown-linux-gnu", target_arch: Arch::Riscv32, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// RISC-V Linux (kernel 5.4, musl + RISCV32 support patches) pub(crate) const RISCV32GC_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "riscv32gc-unknown-linux-musl", target_arch: Arch::Riscv32, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare RISC-V (RV32I ISA) pub(crate) const RISCV32I_UNKNOWN_NONE_ELF: Platform = Platform { target_triple: "riscv32i-unknown-none-elf", target_arch: Arch::Riscv32, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare RISC-V (RV32IM ISA) pub(crate) const RISCV32IM_UNKNOWN_NONE_ELF: Platform = Platform { target_triple: "riscv32im-unknown-none-elf", target_arch: Arch::Riscv32, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// RISC-V ESP-IDF pub(crate) const RISCV32IMAC_ESP_ESPIDF: Platform = Platform { target_triple: "riscv32imac-esp-espidf", target_arch: Arch::Riscv32, target_os: OS::Espidf, target_env: Env::Newlib, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare RISC-V (RV32IMAC ISA) pub(crate) const RISCV32IMAC_UNKNOWN_NONE_ELF: Platform = Platform { target_triple: "riscv32imac-unknown-none-elf", target_arch: Arch::Riscv32, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// RISC-V Xous (RV32IMAC ISA) pub(crate) const RISCV32IMAC_UNKNOWN_XOUS_ELF: Platform = Platform { target_triple: "riscv32imac-unknown-xous-elf", target_arch: Arch::Riscv32, target_os: OS::Xous, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// RISC-V ESP-IDF pub(crate) const RISCV32IMC_ESP_ESPIDF: Platform = Platform { target_triple: "riscv32imc-esp-espidf", target_arch: Arch::Riscv32, target_os: OS::Espidf, target_env: Env::Newlib, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare RISC-V (RV32IMC ISA) pub(crate) const RISCV32IMC_UNKNOWN_NONE_ELF: Platform = Platform { target_triple: "riscv32imc-unknown-none-elf", target_arch: Arch::Riscv32, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// RISC-V 64-bit Android pub(crate) const RISCV64_LINUX_ANDROID: Platform = Platform { target_triple: "riscv64-linux-android", target_arch: Arch::Riscv64, target_os: OS::Android, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// RISC-V FreeBSD pub(crate) const RISCV64GC_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "riscv64gc-unknown-freebsd", target_arch: Arch::Riscv64, target_os: OS::FreeBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// RISC-V Fuchsia pub(crate) const RISCV64GC_UNKNOWN_FUCHSIA: Platform = Platform { target_triple: "riscv64gc-unknown-fuchsia", target_arch: Arch::Riscv64, target_os: OS::Fuchsia, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// RISC-V Hermit pub(crate) const RISCV64GC_UNKNOWN_HERMIT: Platform = Platform { target_triple: "riscv64gc-unknown-hermit", target_arch: Arch::Riscv64, target_os: OS::Hermit, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// RISC-V Linux (kernel 4.20, glibc 2.29) pub(crate) const RISCV64GC_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "riscv64gc-unknown-linux-gnu", target_arch: Arch::Riscv64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// RISC-V Linux (kernel 4.20, musl 1.2.0) pub(crate) const RISCV64GC_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "riscv64gc-unknown-linux-musl", target_arch: Arch::Riscv64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// RISC-V NetBSD pub(crate) const RISCV64GC_UNKNOWN_NETBSD: Platform = Platform { target_triple: "riscv64gc-unknown-netbsd", target_arch: Arch::Riscv64, target_os: OS::NetBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// Bare RISC-V (RV64IMAFDC ISA) pub(crate) const RISCV64GC_UNKNOWN_NONE_ELF: Platform = Platform { target_triple: "riscv64gc-unknown-none-elf", target_arch: Arch::Riscv64, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// OpenBSD/riscv64 pub(crate) const RISCV64GC_UNKNOWN_OPENBSD: Platform = Platform { target_triple: "riscv64gc-unknown-openbsd", target_arch: Arch::Riscv64, target_os: OS::OpenBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// Bare RISC-V (RV64IMAC ISA) pub(crate) const RISCV64IMAC_UNKNOWN_NONE_ELF: Platform = Platform { target_triple: "riscv64imac-unknown-none-elf", target_arch: Arch::Riscv64, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// S390x Linux (kernel 3.2, glibc 2.17) pub(crate) const S390X_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "s390x-unknown-linux-gnu", target_arch: Arch::S390X, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// S390x Linux (kernel 3.2, MUSL) pub(crate) const S390X_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "s390x-unknown-linux-musl", target_arch: Arch::S390X, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 32-bit SPARC Linux pub(crate) const SPARC_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "sparc-unknown-linux-gnu", target_arch: Arch::Sparc, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare 32-bit SPARC V7+ pub(crate) const SPARC_UNKNOWN_NONE_ELF: Platform = Platform { target_triple: "sparc-unknown-none-elf", target_arch: Arch::Sparc, target_os: OS::None, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// SPARC Linux (kernel 4.4, glibc 2.23) pub(crate) const SPARC64_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "sparc64-unknown-linux-gnu", target_arch: Arch::Sparc64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// NetBSD/sparc64 pub(crate) const SPARC64_UNKNOWN_NETBSD: Platform = Platform { target_triple: "sparc64-unknown-netbsd", target_arch: Arch::Sparc64, target_os: OS::NetBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// OpenBSD/sparc64 pub(crate) const SPARC64_UNKNOWN_OPENBSD: Platform = Platform { target_triple: "sparc64-unknown-openbsd", target_arch: Arch::Sparc64, target_os: OS::OpenBSD, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// SPARC Solaris 10/11, illumos pub(crate) const SPARCV9_SUN_SOLARIS: Platform = Platform { target_triple: "sparcv9-sun-solaris", target_arch: Arch::Sparc64, target_os: OS::Solaris, target_env: Env::None, target_endian: Endian::Big, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// Thumb-mode Bare ARMv4T pub(crate) const THUMBV4T_NONE_EABI: Platform = Platform { target_triple: "thumbv4t-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Thumb-mode Bare ARMv5TE pub(crate) const THUMBV5TE_NONE_EABI: Platform = Platform { target_triple: "thumbv5te-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare ARMv6-M pub(crate) const THUMBV6M_NONE_EABI: Platform = Platform { target_triple: "thumbv6m-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; pub(crate) const THUMBV7A_PC_WINDOWS_MSVC: Platform = Platform { target_triple: "thumbv7a-pc-windows-msvc", target_arch: Arch::Arm, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; pub(crate) const THUMBV7A_UWP_WINDOWS_MSVC: Platform = Platform { target_triple: "thumbv7a-uwp-windows-msvc", target_arch: Arch::Arm, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare ARMv7E-M pub(crate) const THUMBV7EM_NONE_EABI: Platform = Platform { target_triple: "thumbv7em-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMV7E-M, hardfloat pub(crate) const THUMBV7EM_NONE_EABIHF: Platform = Platform { target_triple: "thumbv7em-none-eabihf", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMv7-M pub(crate) const THUMBV7M_NONE_EABI: Platform = Platform { target_triple: "thumbv7m-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Thumb2-mode ARMv7-A Android with NEON pub(crate) const THUMBV7NEON_LINUX_ANDROIDEABI: Platform = Platform { target_triple: "thumbv7neon-linux-androideabi", target_arch: Arch::Arm, target_os: OS::Android, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Thumb2-mode ARMv7-A Linux with NEON (kernel 4.4, glibc 2.23) pub(crate) const THUMBV7NEON_UNKNOWN_LINUX_GNUEABIHF: Platform = Platform { target_triple: "thumbv7neon-unknown-linux-gnueabihf", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Thumb2-mode ARMv7-A Linux with NEON, MUSL pub(crate) const THUMBV7NEON_UNKNOWN_LINUX_MUSLEABIHF: Platform = Platform { target_triple: "thumbv7neon-unknown-linux-musleabihf", target_arch: Arch::Arm, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// Bare ARMv8-M Baseline pub(crate) const THUMBV8M_BASE_NONE_EABI: Platform = Platform { target_triple: "thumbv8m.base-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMv8-M Mainline pub(crate) const THUMBV8M_MAIN_NONE_EABI: Platform = Platform { target_triple: "thumbv8m.main-none-eabi", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// Bare ARMv8-M Mainline, hardfloat pub(crate) const THUMBV8M_MAIN_NONE_EABIHF: Platform = Platform { target_triple: "thumbv8m.main-none-eabihf", target_arch: Arch::Arm, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// WebAssembly via Emscripten pub(crate) const WASM32_UNKNOWN_EMSCRIPTEN: Platform = Platform { target_triple: "wasm32-unknown-emscripten", target_arch: Arch::Wasm32, target_os: OS::Emscripten, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// WebAssembly pub(crate) const WASM32_UNKNOWN_UNKNOWN: Platform = Platform { target_triple: "wasm32-unknown-unknown", target_arch: Arch::Wasm32, target_os: OS::Unknown, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// WebAssembly with WASI pub(crate) const WASM32_WASI: Platform = Platform { target_triple: "wasm32-wasi", target_arch: Arch::Wasm32, target_os: OS::Wasi, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// WebAssembly with WASI Preview 1 and threads pub(crate) const WASM32_WASI_PREVIEW1_THREADS: Platform = Platform { target_triple: "wasm32-wasi-preview1-threads", target_arch: Arch::Wasm32, target_os: OS::Wasi, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Three, }; /// WebAssembly pub(crate) const WASM64_UNKNOWN_UNKNOWN: Platform = Platform { target_triple: "wasm64-unknown-unknown", target_arch: Arch::Wasm64, target_os: OS::Unknown, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit macOS (10.7+, Lion+) pub(crate) const X86_64_APPLE_DARWIN: Platform = Platform { target_triple: "x86_64-apple-darwin", target_arch: Arch::X86_64, target_os: OS::MacOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::One, }; /// 64-bit x86 iOS pub(crate) const X86_64_APPLE_IOS: Platform = Platform { target_triple: "x86_64-apple-ios", target_arch: Arch::X86_64, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// Apple Catalyst on x86_64 pub(crate) const X86_64_APPLE_IOS_MACABI: Platform = Platform { target_triple: "x86_64-apple-ios-macabi", target_arch: Arch::X86_64, target_os: OS::iOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// x86 64-bit tvOS pub(crate) const X86_64_APPLE_TVOS: Platform = Platform { target_triple: "x86_64-apple-tvos", target_arch: Arch::X86_64, target_os: OS::TvOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// x86 64-bit Apple WatchOS simulator pub(crate) const X86_64_APPLE_WATCHOS_SIM: Platform = Platform { target_triple: "x86_64-apple-watchos-sim", target_arch: Arch::X86_64, target_os: OS::WatchOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// [Fortanix ABI] for 64-bit Intel SGX pub(crate) const X86_64_FORTANIX_UNKNOWN_SGX: Platform = Platform { target_triple: "x86_64-fortanix-unknown-sgx", target_arch: Arch::X86_64, target_os: OS::Unknown, target_env: Env::Sgx, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// Alias for `x86_64-unknown-fuchsia` pub(crate) const X86_64_FUCHSIA: Platform = Platform { target_triple: "x86_64-fuchsia", target_arch: Arch::X86_64, target_os: OS::Fuchsia, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// 64-bit x86 Android pub(crate) const X86_64_LINUX_ANDROID: Platform = Platform { target_triple: "x86_64-linux-android", target_arch: Arch::X86_64, target_os: OS::Android, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const X86_64_PC_NTO_QNX710: Platform = Platform { target_triple: "x86_64-pc-nto-qnx710", target_arch: Arch::X86_64, target_os: OS::Nto, target_env: Env::Nto71, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit Solaris 10/11, illumos pub(crate) const X86_64_PC_SOLARIS: Platform = Platform { target_triple: "x86_64-pc-solaris", target_arch: Arch::X86_64, target_os: OS::Solaris, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// 64-bit MinGW (Windows 7+) [^windows-support] pub(crate) const X86_64_PC_WINDOWS_GNU: Platform = Platform { target_triple: "x86_64-pc-windows-gnu", target_arch: Arch::X86_64, target_os: OS::Windows, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::One, }; pub(crate) const X86_64_PC_WINDOWS_GNULLVM: Platform = Platform { target_triple: "x86_64-pc-windows-gnullvm", target_arch: Arch::X86_64, target_os: OS::Windows, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit MSVC (Windows 7+) [^windows-support] pub(crate) const X86_64_PC_WINDOWS_MSVC: Platform = Platform { target_triple: "x86_64-pc-windows-msvc", target_arch: Arch::X86_64, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::One, }; /// Deprecated target for 64-bit Solaris 10/11, illumos pub(crate) const X86_64_SUN_SOLARIS: Platform = Platform { target_triple: "x86_64-sun-solaris", target_arch: Arch::X86_64, target_os: OS::Solaris, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit Unikraft with musl pub(crate) const X86_64_UNIKRAFT_LINUX_MUSL: Platform = Platform { target_triple: "x86_64-unikraft-linux-musl", target_arch: Arch::X86_64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit DragonFlyBSD pub(crate) const X86_64_UNKNOWN_DRAGONFLY: Platform = Platform { target_triple: "x86_64-unknown-dragonfly", target_arch: Arch::X86_64, target_os: OS::Dragonfly, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit FreeBSD pub(crate) const X86_64_UNKNOWN_FREEBSD: Platform = Platform { target_triple: "x86_64-unknown-freebsd", target_arch: Arch::X86_64, target_os: OS::FreeBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// 64-bit x86 Fuchsia pub(crate) const X86_64_UNKNOWN_FUCHSIA: Platform = Platform { target_triple: "x86_64-unknown-fuchsia", target_arch: Arch::X86_64, target_os: OS::Fuchsia, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// 64-bit Haiku pub(crate) const X86_64_UNKNOWN_HAIKU: Platform = Platform { target_triple: "x86_64-unknown-haiku", target_arch: Arch::X86_64, target_os: OS::Haiku, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// x86_64 Hermit pub(crate) const X86_64_UNKNOWN_HERMIT: Platform = Platform { target_triple: "x86_64-unknown-hermit", target_arch: Arch::X86_64, target_os: OS::Hermit, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// illumos pub(crate) const X86_64_UNKNOWN_ILLUMOS: Platform = Platform { target_triple: "x86_64-unknown-illumos", target_arch: Arch::X86_64, target_os: OS::IllumOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const X86_64_UNKNOWN_L4RE_UCLIBC: Platform = Platform { target_triple: "x86_64-unknown-l4re-uclibc", target_arch: Arch::X86_64, target_os: OS::L4re, target_env: Env::UClibc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// 64-bit Linux (kernel 3.2+, glibc 2.17+) pub(crate) const X86_64_UNKNOWN_LINUX_GNU: Platform = Platform { target_triple: "x86_64-unknown-linux-gnu", target_arch: Arch::X86_64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::One, }; /// 64-bit Linux (x32 ABI) (kernel 4.15, glibc 2.27) pub(crate) const X86_64_UNKNOWN_LINUX_GNUX32: Platform = Platform { target_triple: "x86_64-unknown-linux-gnux32", target_arch: Arch::X86_64, target_os: OS::Linux, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U32, tier: Tier::Two, }; /// 64-bit Linux with MUSL pub(crate) const X86_64_UNKNOWN_LINUX_MUSL: Platform = Platform { target_triple: "x86_64-unknown-linux-musl", target_arch: Arch::X86_64, target_os: OS::Linux, target_env: Env::Musl, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const X86_64_UNKNOWN_LINUX_OHOS: Platform = Platform { target_triple: "x86_64-unknown-linux-ohos", target_arch: Arch::X86_64, target_os: OS::Linux, target_env: Env::OhOS, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// NetBSD/amd64 pub(crate) const X86_64_UNKNOWN_NETBSD: Platform = Platform { target_triple: "x86_64-unknown-netbsd", target_arch: Arch::X86_64, target_os: OS::NetBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// Freestanding/bare-metal x86_64, softfloat pub(crate) const X86_64_UNKNOWN_NONE: Platform = Platform { target_triple: "x86_64-unknown-none", target_arch: Arch::X86_64, target_os: OS::None, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// 64-bit OpenBSD pub(crate) const X86_64_UNKNOWN_OPENBSD: Platform = Platform { target_triple: "x86_64-unknown-openbsd", target_arch: Arch::X86_64, target_os: OS::OpenBSD, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// Redox OS pub(crate) const X86_64_UNKNOWN_REDOX: Platform = Platform { target_triple: "x86_64-unknown-redox", target_arch: Arch::X86_64, target_os: OS::Redox, target_env: Env::Relibc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; /// 64-bit UEFI pub(crate) const X86_64_UNKNOWN_UEFI: Platform = Platform { target_triple: "x86_64-unknown-uefi", target_arch: Arch::X86_64, target_os: OS::Uefi, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Two, }; pub(crate) const X86_64_UWP_WINDOWS_GNU: Platform = Platform { target_triple: "x86_64-uwp-windows-gnu", target_arch: Arch::X86_64, target_os: OS::Windows, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; pub(crate) const X86_64_UWP_WINDOWS_MSVC: Platform = Platform { target_triple: "x86_64-uwp-windows-msvc", target_arch: Arch::X86_64, target_os: OS::Windows, target_env: Env::Msvc, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; pub(crate) const X86_64_WRS_VXWORKS: Platform = Platform { target_triple: "x86_64-wrs-vxworks", target_arch: Arch::X86_64, target_os: OS::VxWorks, target_env: Env::Gnu, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; /// macOS with late-gen Intel (at least Haswell) pub(crate) const X86_64H_APPLE_DARWIN: Platform = Platform { target_triple: "x86_64h-apple-darwin", target_arch: Arch::X86_64, target_os: OS::MacOS, target_env: Env::None, target_endian: Endian::Little, target_pointer_width: PointerWidth::U64, tier: Tier::Three, }; platforms-3.1.2/src/platform/req.rs000064400000000000000000000166621046102023000154210ustar 00000000000000//! Platform requirements use crate::error::Error; use crate::platform::Platform; use std::{fmt, str::FromStr, string::String}; #[cfg(feature = "serde")] use serde::{de, ser, Deserialize, Serialize}; /// Platform requirements: glob-like expressions for matching Rust platforms /// as identified by a "target triple", e.g. `i686-apple-darwin`. /// /// For a list of all valid platforms, "target triples", see: /// /// /// /// Platforms can be grouped with simple globbing rules: /// /// - Start with wildcard: `*-gnu` /// - End with wildcard: `x86_64-*` /// - Start and end with wildcard: `*windows*` #[derive(Clone, Debug, Eq, PartialEq)] pub struct PlatformReq(String); /// Wildcard character used for globbing pub const WILDCARD: char = '*'; impl PlatformReq { /// Borrow this platform requirement as a string slice pub fn as_str(&self) -> &str { self.0.as_ref() } /// Does this platform requirement match the given platform string? /// /// This matcher accepts a platform "target triple" string ala /// `x86_64-unknown-linux-gnu` and matches it against this /// `Platform`, using simple glob like rules. pub fn matches(&self, platform: &Platform) -> bool { let self_len = self.as_str().len(); // Universal matcher if self.0.len() == 1 && self.0.chars().next().unwrap() == WILDCARD { return true; } let mut chars = self.as_str().chars(); let starts_with_wildcard = chars.next().unwrap() == WILDCARD; let ends_with_wildcard = chars.last() == Some(WILDCARD); if starts_with_wildcard { if ends_with_wildcard { // Contains expression: `*windows*` platform .target_triple .contains(&self.0[1..self_len.checked_sub(1).unwrap()]) } else { // Suffix expression: `*-gnu` platform.target_triple.ends_with(&self.0[1..]) } } else if ends_with_wildcard { // Prefix expression: `x86_64-*` platform .target_triple .starts_with(&self.0[..self_len.checked_sub(1).unwrap()]) } else { // No wildcards: direct comparison self.as_str() == platform.target_triple } } /// Expand glob expressions into a list of all known matching platforms pub fn matching_platforms(&self) -> impl Iterator { matching_platforms(self, Platform::ALL) } } // Split into its own function for unit testing #[inline] fn matching_platforms<'a>( req: &'a PlatformReq, platforms: &'a [Platform], ) -> impl Iterator { platforms .iter() .filter(move |&platform| req.matches(platform)) } impl FromStr for PlatformReq { type Err = Error; /// Create a new platform requirement. Platforms support glob-like /// wildcards on the beginning and end, e.g. `*windows*`. /// /// Must match at least one known Rust platform "target triple" /// (e.g. `x86_64-unknown-linux-gnu`) to be considered valid. fn from_str(req_str: &str) -> Result { let platform_req = PlatformReq(req_str.into()); if platform_req.0.is_empty() || platform_req.matching_platforms().next().is_none() { Err(Error) } else { Ok(platform_req) } } } impl fmt::Display for PlatformReq { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.as_str()) } } #[cfg(feature = "serde")] impl Serialize for PlatformReq { fn serialize(&self, serializer: S) -> Result { serializer.serialize_str(self.as_str()) } } #[cfg(feature = "serde")] impl<'de> Deserialize<'de> for PlatformReq { fn deserialize>(deserializer: D) -> Result { use de::Error; String::deserialize(deserializer)? .parse() .map_err(D::Error::custom) } } #[cfg(test)] mod tests { use super::*; use std::{str::FromStr, vec::Vec}; use crate::platform::platforms::*; const TEST_PLATFORM_LIST: &[Platform] = &[ AARCH64_PC_WINDOWS_MSVC, AARCH64_UNKNOWN_LINUX_MUSL, ARMV7_UNKNOWN_LINUX_MUSLEABI, ARMV7_UNKNOWN_LINUX_MUSLEABIHF, SPARC_UNKNOWN_LINUX_GNU, SPARC64_UNKNOWN_LINUX_GNU, SPARC64_UNKNOWN_NETBSD, SPARC64_UNKNOWN_OPENBSD, SPARCV9_SUN_SOLARIS, AARCH64_UWP_WINDOWS_MSVC, I586_PC_WINDOWS_MSVC, I686_PC_WINDOWS_GNU, I686_PC_WINDOWS_MSVC, I686_UWP_WINDOWS_GNU, I686_UWP_WINDOWS_MSVC, MIPS64_UNKNOWN_LINUX_GNUABI64, MIPS64_UNKNOWN_LINUX_MUSLABI64, THUMBV7A_PC_WINDOWS_MSVC, THUMBV7A_UWP_WINDOWS_MSVC, RISCV64GC_UNKNOWN_LINUX_MUSL, X86_64_PC_WINDOWS_GNU, ]; #[test] fn prefix_glob_test() { let req = PlatformReq::from_str("sparc*").unwrap(); assert_eq!( matching_platforms(&req, TEST_PLATFORM_LIST) .map(|p| p.target_triple) .collect::>(), [ "sparc-unknown-linux-gnu", "sparc64-unknown-linux-gnu", "sparc64-unknown-netbsd", "sparc64-unknown-openbsd", "sparcv9-sun-solaris" ] ); } #[test] fn suffix_glob_test() { let req = PlatformReq::from_str("*-musl").unwrap(); assert_eq!( matching_platforms(&req, TEST_PLATFORM_LIST) .map(|p| p.target_triple) .collect::>(), ["aarch64-unknown-linux-musl", "riscv64gc-unknown-linux-musl"] ); } #[test] fn contains_glob_test() { let req = PlatformReq::from_str("*windows*").unwrap(); assert_eq!( matching_platforms(&req, TEST_PLATFORM_LIST) .map(|p| p.target_triple) .collect::>(), [ "aarch64-pc-windows-msvc", "aarch64-uwp-windows-msvc", "i586-pc-windows-msvc", "i686-pc-windows-gnu", "i686-pc-windows-msvc", "i686-uwp-windows-gnu", "i686-uwp-windows-msvc", "thumbv7a-pc-windows-msvc", "thumbv7a-uwp-windows-msvc", "x86_64-pc-windows-gnu", ] ); } #[test] fn direct_match_test() { let req = PlatformReq::from_str("x86_64-unknown-dragonfly").unwrap(); assert_eq!( req.matching_platforms() .map(|p| p.target_triple) .collect::>(), ["x86_64-unknown-dragonfly"] ); } #[test] fn wildcard_test() { let req = PlatformReq::from_str("*").unwrap(); assert_eq!(req.matching_platforms().count(), Platform::ALL.len()) } // How to handle this is debatable... #[test] fn double_wildcard_test() { let req = PlatformReq::from_str("**").unwrap(); assert_eq!(req.matching_platforms().count(), Platform::ALL.len()) } #[test] fn invalid_req_tests() { assert!(PlatformReq::from_str("").is_err()); assert!(PlatformReq::from_str(" ").is_err()); assert!(PlatformReq::from_str("derp").is_err()); assert!(PlatformReq::from_str("***").is_err()); } } platforms-3.1.2/src/platform/tier.rs000064400000000000000000000067441046102023000155750ustar 00000000000000//! Rust platform tiers use crate::error::Error; use core::{convert::TryFrom, fmt, str::FromStr}; #[cfg(feature = "serde")] use serde::{de, ser, Deserialize, Serialize}; /// Rust platform tiers: support levels are organized into three tiers, each /// with a different set of guarantees. #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] pub enum Tier { /// Tier 1 platforms can be thought of as “guaranteed to work”. /// Specifically they will each satisfy the following requirements: /// /// * Official binary releases are provided for the platform. /// * Automated testing is set up to run tests for the platform. /// * Landing changes to the rust-lang/rust repository’s master branch /// is gated on tests passing. /// * Documentation for how to use and how to build the platform is available. One, /// Tier 2 platforms can be thought of as “guaranteed to build”. Automated /// tests are not run so it’s not guaranteed to produce a working build, /// but platforms often work to quite a good degree and patches are always /// welcome! /// /// Specifically, these platforms are required to have each of the following: /// /// * Official binary releases are provided for the platform. /// * Automated building is set up, but may not be running tests. /// * Landing changes to the rust-lang/rust repository’s master branch is /// gated on platforms building. For some platforms only the standard /// library is compiled, but for others rustc and cargo are too. Two, /// Tier 3 platforms are those which the Rust codebase has support for, but /// which are not built or tested automatically, and may not work. /// Official builds are not available. Three, } impl Tier { /// Get a number identifying this tier pub fn to_usize(self) -> usize { match self { Tier::One => 1, Tier::Two => 2, Tier::Three => 3, } } /// Get a string identifying this tier pub fn as_str(self) -> &'static str { match self { Tier::One => "tier1", Tier::Two => "tier2", Tier::Three => "tier3", } } } impl From for usize { fn from(tier: Tier) -> usize { tier.to_usize() } } impl TryFrom for Tier { type Error = Error; fn try_from(num: usize) -> Result { match num { 1 => Ok(Tier::One), 2 => Ok(Tier::Two), 3 => Ok(Tier::Three), _ => Err(Error), } } } impl FromStr for Tier { type Err = Error; fn from_str(s: &str) -> Result { match s { "tier1" => Ok(Tier::One), "tier2" => Ok(Tier::Two), "tier3" => Ok(Tier::Three), _ => Err(Error), } } } impl fmt::Display for Tier { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.as_str()) } } #[cfg(feature = "serde")] impl Serialize for Tier { fn serialize(&self, serializer: S) -> Result { serializer.serialize_str(self.as_str()) } } #[cfg(all(feature = "serde", feature = "std"))] impl<'de> Deserialize<'de> for Tier { fn deserialize>(deserializer: D) -> Result { use de::Error; std::string::String::deserialize(deserializer)? .parse() .map_err(D::Error::custom) } } platforms-3.1.2/src/platform.rs000064400000000000000000000104701046102023000146210ustar 00000000000000//! Rust platforms mod platforms; #[cfg(feature = "std")] mod req; mod tier; pub use self::tier::Tier; #[cfg(feature = "std")] pub use self::req::PlatformReq; use self::platforms::ALL; use crate::target::*; use core::fmt; /// Rust platforms supported by mainline rustc /// /// Sourced from /// as well as the latest nightly version of `rustc` #[derive(Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[non_exhaustive] pub struct Platform { /// "Target triple" string uniquely identifying the platform. See: /// /// /// These are defined in the `rustc_target` crate of the Rust compiler: /// pub target_triple: &'static str, /// Target architecture `cfg` attribute (i.e. `cfg(target_arch)`) pub target_arch: Arch, /// Target OS `cfg` attribute (i.e. `cfg(target_os)`). pub target_os: OS, /// Target environment `cfg` attribute (i.e. `cfg(target_env)`). /// Only used when needed for disambiguation, e.g. on many GNU platforms /// this value will be `None`. pub target_env: Env, /// Target pointer width `cfg` attribute, in bits (i.e. `cfg(target_pointer_width)`). /// Typically 64 on modern platforms, 32 on older platforms, 16 on some microcontrollers. pub target_pointer_width: PointerWidth, /// Target [endianness](https://en.wikipedia.org/wiki/Endianness) `cfg` attribute (i.e. `cfg(target_endian)`). /// Set to "little" on the vast majority of modern platforms. pub target_endian: Endian, /// Tier of this platform: /// /// - `Tier::One`: guaranteed to work /// - `Tier::Two`: guaranteed to build /// - `Tier::Three`: unofficially supported with no guarantees pub tier: Tier, } impl Platform { /// All valid Rust platforms usable from the mainline compiler. /// /// Note that this list will evolve over time, and platforms will be both added and removed. pub const ALL: &'static [Platform] = ALL; /// Find a Rust platform by its "target triple", e.g. `i686-apple-darwin` pub fn find(target_triple: &str) -> Option<&'static Platform> { Self::ALL .iter() .find(|platform| platform.target_triple == target_triple) } } impl fmt::Display for Platform { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.target_triple) } } #[cfg(all(test, feature = "std"))] mod tests { use super::Platform; use std::collections::HashSet; /// Ensure there are no duplicate target triples in the platforms list #[test] fn no_dupes_test() { let mut target_triples = HashSet::new(); for platform in Platform::ALL { assert!( target_triples.insert(platform.target_triple), "duplicate target triple: {}", platform.target_triple ); } } use std::collections::HashMap; use super::*; /// `platforms` v2.0 used to provide various constants passed as `cfg` values, /// and attempted to detect the target triple based on that. /// This test is meant to check whether such detection can be accurate. /// /// Turns out that as of v3.0 this is infeasible, /// even though the list of supported cfg values was expanded. /// /// I have also verified that no possible expansion of the supported cfg fields /// will lets uniquely identify the platform based on cfg values using a shell script: /// `rustc --print=target-list | parallel 'rustc --print=cfg --target={} > ./{}'; fdupes` #[test] #[ignore] fn test_detection_feasibility() { let mut all_platforms = HashMap::new(); for p in ALL { if let Some(other_p) = all_platforms.insert( ( p.target_arch, p.target_os, p.target_env, p.target_endian, p.target_pointer_width, ), p.target_triple, ) { panic!("{} and {} have identical properties, and cannot be distinguished based on properties alone", p.target_triple, other_p); } } } } platforms-3.1.2/src/target/arch.rs000064400000000000000000000107151046102023000152020ustar 00000000000000//! Rust architectures use crate::error::Error; use core::{fmt, str::FromStr}; #[cfg(feature = "serde")] use serde::{de, de::Error as DeError, ser, Deserialize, Serialize}; /// `target_arch`: Target CPU architecture #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[non_exhaustive] pub enum Arch { /// `aarch64`: ARMv8 64-bit architecture AArch64, /// `arm`: 32-bit ARM architecture Arm, /// `avr` Avr, /// `bpf` Bpf, /// `csky` Csky, /// `hexagon` Hexagon, /// `loongarch64` Loongarch64, /// `m68k` M68k, /// `mips`: 32-bit MIPS CPU architecture Mips, /// `mips32r6` Mips32r6, /// `mips64`: 64-bit MIPS CPU architecture Mips64, /// `mips64r6` Mips64r6, /// `msp430`: 16-bit MSP430 microcontrollers Msp430, /// `nvptx64`: 64-bit NVIDIA PTX Nvptx64, /// `powerpc`: 32-bit POWERPC platform PowerPc, /// `powerpc64`: 64-bit POWERPC platform PowerPc64, /// `riscv32` Riscv32, /// `riscv64` Riscv64, /// `s390x`: 64-bit IBM z/Architecture S390X, /// `sparc`: 32-bit SPARC CPU architecture Sparc, /// `sparc64`: 64-bit SPARC CPU architecture Sparc64, /// `wasm32`: Web Assembly (32-bit) Wasm32, /// `wasm64` Wasm64, /// `x86`: Generic x86 CPU architecture X86, /// `x86_64`: 'AMD64' CPU architecture X86_64, } impl Arch { /// String representing this `Arch` which matches `#[cfg(target_arch)]` pub fn as_str(self) -> &'static str { match self { Arch::AArch64 => "aarch64", Arch::Arm => "arm", Arch::Avr => "avr", Arch::Bpf => "bpf", Arch::Csky => "csky", Arch::Hexagon => "hexagon", Arch::Loongarch64 => "loongarch64", Arch::M68k => "m68k", Arch::Mips => "mips", Arch::Mips32r6 => "mips32r6", Arch::Mips64 => "mips64", Arch::Mips64r6 => "mips64r6", Arch::Msp430 => "msp430", Arch::Nvptx64 => "nvptx64", Arch::PowerPc => "powerpc", Arch::PowerPc64 => "powerpc64", Arch::Riscv32 => "riscv32", Arch::Riscv64 => "riscv64", Arch::S390X => "s390x", Arch::Sparc => "sparc", Arch::Sparc64 => "sparc64", Arch::Wasm32 => "wasm32", Arch::Wasm64 => "wasm64", Arch::X86 => "x86", Arch::X86_64 => "x86_64", } } } impl FromStr for Arch { type Err = Error; /// Create a new `Arch` from the given string fn from_str(name: &str) -> Result { let result = match name { "aarch64" => Arch::AArch64, "arm" => Arch::Arm, "avr" => Arch::Avr, "bpf" => Arch::Bpf, "csky" => Arch::Csky, "hexagon" => Arch::Hexagon, "loongarch64" => Arch::Loongarch64, "m68k" => Arch::M68k, "mips" => Arch::Mips, "mips32r6" => Arch::Mips32r6, "mips64" => Arch::Mips64, "mips64r6" => Arch::Mips64r6, "msp430" => Arch::Msp430, "nvptx64" => Arch::Nvptx64, "powerpc" => Arch::PowerPc, "powerpc64" => Arch::PowerPc64, "riscv32" => Arch::Riscv32, "riscv64" => Arch::Riscv64, "s390x" => Arch::S390X, "sparc" => Arch::Sparc, "sparc64" => Arch::Sparc64, "wasm32" => Arch::Wasm32, "wasm64" => Arch::Wasm64, "x86" => Arch::X86, "x86_64" => Arch::X86_64, _ => return Err(Error), }; Ok(result) } } impl fmt::Display for Arch { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.as_str()) } } #[cfg(feature = "serde")] impl Serialize for Arch { fn serialize(&self, serializer: S) -> Result { serializer.serialize_str(self.as_str()) } } #[cfg(all(feature = "serde", feature = "std"))] impl<'de> Deserialize<'de> for Arch { fn deserialize>(deserializer: D) -> Result { let string = std::string::String::deserialize(deserializer)?; string.parse().map_err(|_| { D::Error::custom(std::format!( "Unrecognized value '{}' for target_arch", string )) }) } } platforms-3.1.2/src/target/endian.rs000064400000000000000000000034021046102023000155160ustar 00000000000000//! Endianness use crate::error::Error; use core::{fmt, str::FromStr}; #[cfg(feature = "serde")] use serde::{de, de::Error as DeError, ser, Deserialize, Serialize}; /// `target_endian`: [Endianness](https://en.wikipedia.org/wiki/Endianness) of the target. #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[non_exhaustive] pub enum Endian { /// `big` Big, /// `little` Little, } impl Endian { /// String representing this `Endian` which matches `#[cfg(target_endian)]` pub fn as_str(self) -> &'static str { match self { Endian::Big => "big", Endian::Little => "little", } } } impl FromStr for Endian { type Err = Error; /// Create a new `Endian` from the given string fn from_str(name: &str) -> Result { let result = match name { "big" => Endian::Big, "little" => Endian::Little, _ => return Err(Error), }; Ok(result) } } impl fmt::Display for Endian { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.as_str()) } } #[cfg(feature = "serde")] impl Serialize for Endian { fn serialize(&self, serializer: S) -> Result { serializer.serialize_str(self.as_str()) } } #[cfg(all(feature = "serde", feature = "std"))] impl<'de> Deserialize<'de> for Endian { fn deserialize>(deserializer: D) -> Result { let string = std::string::String::deserialize(deserializer)?; string.parse().map_err(|_| { D::Error::custom(std::format!( "Unrecognized value '{}' for target_endian", string )) }) } } platforms-3.1.2/src/target/env.rs000064400000000000000000000064651046102023000150640ustar 00000000000000//! Rust target environments use crate::error::Error; use core::{fmt, str::FromStr}; #[cfg(feature = "serde")] use serde::{de, de::Error as DeError, ser, Deserialize, Serialize}; /// `target_env`: target environment that disambiguates the target platform by ABI / libc. /// /// This value is closely related to the fourth element of the platform target triple, /// though it is not identical. For example, embedded ABIs such as `gnueabihf` will simply /// define `target_env` as `"gnu"` (i.e. `target::Env::GNU`) #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[non_exhaustive] pub enum Env { /// ``: None None, /// `eabihf` Eabihf, /// `gnu`: The GNU C Library (glibc) Gnu, /// `gnueabihf` Gnueabihf, /// `msvc`: Microsoft Visual C(++) Msvc, /// `musl`: Clean, efficient, standards-conformant libc implementation. Musl, /// `newlib` Newlib, /// `nto70` Nto70, /// `nto71` Nto71, /// `ohos` OhOS, /// `psx` Psx, /// `relibc` Relibc, /// `sgx`: Intel Software Guard Extensions (SGX) Enclave Sgx, /// `uclibc`: C library for developing embedded Linux systems UClibc, } impl Env { /// String representing this `Env` which matches `#[cfg(target_env)]` pub fn as_str(self) -> &'static str { match self { Env::None => "", Env::Eabihf => "eabihf", Env::Gnu => "gnu", Env::Gnueabihf => "gnueabihf", Env::Msvc => "msvc", Env::Musl => "musl", Env::Newlib => "newlib", Env::Nto70 => "nto70", Env::Nto71 => "nto71", Env::OhOS => "ohos", Env::Psx => "psx", Env::Relibc => "relibc", Env::Sgx => "sgx", Env::UClibc => "uclibc", } } } impl FromStr for Env { type Err = Error; /// Create a new `Env` from the given string fn from_str(name: &str) -> Result { let result = match name { "" => Env::None, "eabihf" => Env::Eabihf, "gnu" => Env::Gnu, "gnueabihf" => Env::Gnueabihf, "msvc" => Env::Msvc, "musl" => Env::Musl, "newlib" => Env::Newlib, "nto70" => Env::Nto70, "nto71" => Env::Nto71, "ohos" => Env::OhOS, "psx" => Env::Psx, "relibc" => Env::Relibc, "sgx" => Env::Sgx, "uclibc" => Env::UClibc, _ => return Err(Error), }; Ok(result) } } impl fmt::Display for Env { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.as_str()) } } #[cfg(feature = "serde")] impl Serialize for Env { fn serialize(&self, serializer: S) -> Result { serializer.serialize_str(self.as_str()) } } #[cfg(all(feature = "serde", feature = "std"))] impl<'de> Deserialize<'de> for Env { fn deserialize>(deserializer: D) -> Result { let string = std::string::String::deserialize(deserializer)?; string.parse().map_err(|_| { D::Error::custom(std::format!( "Unrecognized value '{}' for target_env", string )) }) } } platforms-3.1.2/src/target/os.rs000064400000000000000000000134151046102023000147060ustar 00000000000000//! Operating systems use crate::error::Error; use core::{fmt, str::FromStr}; #[cfg(feature = "serde")] use serde::{de, de::Error as DeError, ser, Deserialize, Serialize}; /// `target_os`: Operating system of the target. /// /// This value is closely related to the second and third element /// of the platform target triple, though it is not identical. #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[non_exhaustive] pub enum OS { /// `aix` Aix, /// `android`: Google's Android mobile operating system Android, /// `cuda`: CUDA parallel computing platform Cuda, /// `dragonfly`: DragonflyBSD Dragonfly, /// `emscripten`: The emscripten JavaScript transpiler Emscripten, /// `espidf` Espidf, /// `freebsd`: The FreeBSD operating system FreeBSD, /// `fuchsia`: Google's next-gen Rust OS Fuchsia, /// `haiku`: Haiku, an open source BeOS clone Haiku, /// `hermit`: HermitCore is a novel unikernel operating system targeting a scalable and predictable runtime behavior for HPC and cloud environments Hermit, /// `horizon` Horizon, /// `illumos`: illumos is a partly free and open-source Unix operating system based on OpenSolaris IllumOS, /// `ios`: Apple's iOS mobile operating system #[allow(non_camel_case_types)] iOS, /// `l4re` L4re, /// `linux`: Linux Linux, /// `macos`: Apple's Mac OS X MacOS, /// `netbsd`: The NetBSD operating system NetBSD, /// `none` None, /// `nto` Nto, /// `openbsd`: The OpenBSD operating system OpenBSD, /// `psp` Psp, /// `redox`: Redox, a Unix-like OS written in Rust Redox, /// `solaris`: Oracle's (formerly Sun) Solaris operating system Solaris, /// `solid_asp3` SolidAsp3, /// `teeos` TeeOS, /// `tvos` TvOS, /// `uefi` Uefi, /// `unknown` Unknown, /// `vita` Vita, /// `vxworks`: VxWorks is a deterministic, priority-based preemptive RTOS with low latency and minimal jitter VxWorks, /// `wasi`: The WebAssembly System Interface Wasi, /// `watchos` WatchOS, /// `windows`: Microsoft's Windows operating system Windows, /// `xous` Xous, } impl OS { /// String representing this `OS` which matches `#[cfg(target_os)]` pub fn as_str(self) -> &'static str { match self { OS::Aix => "aix", OS::Android => "android", OS::Cuda => "cuda", OS::Dragonfly => "dragonfly", OS::Emscripten => "emscripten", OS::Espidf => "espidf", OS::FreeBSD => "freebsd", OS::Fuchsia => "fuchsia", OS::Haiku => "haiku", OS::Hermit => "hermit", OS::Horizon => "horizon", OS::IllumOS => "illumos", OS::iOS => "ios", OS::L4re => "l4re", OS::Linux => "linux", OS::MacOS => "macos", OS::NetBSD => "netbsd", OS::None => "none", OS::Nto => "nto", OS::OpenBSD => "openbsd", OS::Psp => "psp", OS::Redox => "redox", OS::Solaris => "solaris", OS::SolidAsp3 => "solid_asp3", OS::TeeOS => "teeos", OS::TvOS => "tvos", OS::Uefi => "uefi", OS::Unknown => "unknown", OS::Vita => "vita", OS::VxWorks => "vxworks", OS::Wasi => "wasi", OS::WatchOS => "watchos", OS::Windows => "windows", OS::Xous => "xous", } } } impl FromStr for OS { type Err = Error; /// Create a new `OS` from the given string fn from_str(name: &str) -> Result { let result = match name { "aix" => OS::Aix, "android" => OS::Android, "cuda" => OS::Cuda, "dragonfly" => OS::Dragonfly, "emscripten" => OS::Emscripten, "espidf" => OS::Espidf, "freebsd" => OS::FreeBSD, "fuchsia" => OS::Fuchsia, "haiku" => OS::Haiku, "hermit" => OS::Hermit, "horizon" => OS::Horizon, "illumos" => OS::IllumOS, "ios" => OS::iOS, "l4re" => OS::L4re, "linux" => OS::Linux, "macos" => OS::MacOS, "netbsd" => OS::NetBSD, "none" => OS::None, "nto" => OS::Nto, "openbsd" => OS::OpenBSD, "psp" => OS::Psp, "redox" => OS::Redox, "solaris" => OS::Solaris, "solid_asp3" => OS::SolidAsp3, "teeos" => OS::TeeOS, "tvos" => OS::TvOS, "uefi" => OS::Uefi, "unknown" => OS::Unknown, "vita" => OS::Vita, "vxworks" => OS::VxWorks, "wasi" => OS::Wasi, "watchos" => OS::WatchOS, "windows" => OS::Windows, "xous" => OS::Xous, _ => return Err(Error), }; Ok(result) } } impl fmt::Display for OS { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.as_str()) } } #[cfg(feature = "serde")] impl Serialize for OS { fn serialize(&self, serializer: S) -> Result { serializer.serialize_str(self.as_str()) } } #[cfg(all(feature = "serde", feature = "std"))] impl<'de> Deserialize<'de> for OS { fn deserialize>(deserializer: D) -> Result { let string = std::string::String::deserialize(deserializer)?; string.parse().map_err(|_| { D::Error::custom(std::format!( "Unrecognized value '{}' for target_os", string )) }) } } platforms-3.1.2/src/target/pointerwidth.rs000064400000000000000000000051771046102023000170130ustar 00000000000000//! Pointer width of the target architecture use crate::error::Error; use core::{fmt, str::FromStr}; #[cfg(feature = "serde")] use serde::{de, de::Error as DeError, ser, Deserialize, Serialize}; /// `target_pointer_width`: Size of native pointer types (`usize`, `isize`) in bits /// /// 64 bits for modern desktops and phones, 32-bits for older devices, 16 bits for certain microcontrollers #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[non_exhaustive] pub enum PointerWidth { /// `16` U16, /// `32` U32, /// `64` U64, } impl PointerWidth { /// String representing this `PointerWidth` which matches `#[cfg(target_pointer_width)]` pub fn as_str(self) -> &'static str { match self { PointerWidth::U16 => "16", PointerWidth::U32 => "32", PointerWidth::U64 => "64", } } } impl FromStr for PointerWidth { type Err = Error; /// Create a new `PointerWidth` from the given string fn from_str(name: &str) -> Result { let result = match name { "16" => PointerWidth::U16, "32" => PointerWidth::U32, "64" => PointerWidth::U64, _ => return Err(Error), }; Ok(result) } } use core::convert::TryFrom; impl TryFrom for PointerWidth { type Error = &'static str; fn try_from(value: u8) -> Result { match value { 64 => Ok(PointerWidth::U64), 32 => Ok(PointerWidth::U32), 16 => Ok(PointerWidth::U16), _ => Err("Invalid pointer width!"), } } } impl From for u8 { fn from(value: PointerWidth) -> Self { match value { PointerWidth::U64 => 64, PointerWidth::U32 => 32, PointerWidth::U16 => 16, } } } impl fmt::Display for PointerWidth { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.as_str()) } } #[cfg(feature = "serde")] impl Serialize for PointerWidth { fn serialize(&self, serializer: S) -> Result { serializer.serialize_str(self.as_str()) } } #[cfg(all(feature = "serde", feature = "std"))] impl<'de> Deserialize<'de> for PointerWidth { fn deserialize>(deserializer: D) -> Result { let string = std::string::String::deserialize(deserializer)?; string.parse().map_err(|_| { D::Error::custom(std::format!( "Unrecognized value '{}' for target_pointer_width", string )) }) } } platforms-3.1.2/src/target.rs000064400000000000000000000005271046102023000142650ustar 00000000000000//! Target `cfg` attributes. Documented in the "Conditional compilation" section //! of the Rust reference: //! //! mod arch; mod endian; mod env; mod os; mod pointerwidth; pub use self::{arch::Arch, endian::Endian, env::Env, os::OS, pointerwidth::PointerWidth};