├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .travis.yml ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── src ├── channel.rs ├── date.rs ├── lib.rs └── version.rs └── static └── stable ├── terse ├── rustc-1.0.0 ├── rustc-1.1.0 ├── rustc-1.10.0 ├── rustc-1.11.0 ├── rustc-1.12.0 ├── rustc-1.13.0 ├── rustc-1.14.0 ├── rustc-1.15.0 ├── rustc-1.16.0 ├── rustc-1.17.0 ├── rustc-1.18.0 ├── rustc-1.19.0 ├── rustc-1.2.0 ├── rustc-1.20.0 ├── rustc-1.21.0 ├── rustc-1.22.0 ├── rustc-1.23.0 ├── rustc-1.24.0 ├── rustc-1.25.0 ├── rustc-1.26.0 ├── rustc-1.27.0 ├── rustc-1.28.0 ├── rustc-1.29.0 ├── rustc-1.3.0 ├── rustc-1.30.0 ├── rustc-1.31.0 ├── rustc-1.32.0 ├── rustc-1.33.0 ├── rustc-1.34.0 ├── rustc-1.35.0 ├── rustc-1.36.0 ├── rustc-1.37.0 ├── rustc-1.38.0 ├── rustc-1.39.0 ├── rustc-1.4.0 ├── rustc-1.40.0 ├── rustc-1.41.0 ├── rustc-1.42.0 ├── rustc-1.43.0 ├── rustc-1.44.0 ├── rustc-1.45.0 ├── rustc-1.46.0 ├── rustc-1.47.0 ├── rustc-1.48.0 ├── rustc-1.49.0 ├── rustc-1.5.0 ├── rustc-1.50.0 ├── rustc-1.6.0 ├── rustc-1.7.0 ├── rustc-1.8.0 └── rustc-1.9.0 └── verbose ├── rustc-1.0.0 ├── rustc-1.1.0 ├── rustc-1.10.0 ├── rustc-1.11.0 ├── rustc-1.12.0 ├── rustc-1.13.0 ├── rustc-1.14.0 ├── rustc-1.15.0 ├── rustc-1.16.0 ├── rustc-1.17.0 ├── rustc-1.18.0 ├── rustc-1.19.0 ├── rustc-1.2.0 ├── rustc-1.20.0 ├── rustc-1.21.0 ├── rustc-1.22.0 ├── rustc-1.23.0 ├── rustc-1.24.0 ├── rustc-1.25.0 ├── rustc-1.26.0 ├── rustc-1.27.0 ├── rustc-1.28.0 ├── rustc-1.29.0 ├── rustc-1.3.0 ├── rustc-1.30.0 ├── rustc-1.31.0 ├── rustc-1.32.0 ├── rustc-1.33.0 ├── rustc-1.34.0 ├── rustc-1.35.0 ├── rustc-1.36.0 ├── rustc-1.37.0 ├── rustc-1.38.0 ├── rustc-1.39.0 ├── rustc-1.4.0 ├── rustc-1.40.0 ├── rustc-1.41.0 ├── rustc-1.42.0 ├── rustc-1.43.0 ├── rustc-1.44.0 ├── rustc-1.45.0 ├── rustc-1.46.0 ├── rustc-1.47.0 ├── rustc-1.48.0 ├── rustc-1.49.0 ├── rustc-1.5.0 ├── rustc-1.50.0 ├── rustc-1.6.0 ├── rustc-1.7.0 ├── rustc-1.8.0 └── rustc-1.9.0 /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push, pull_request] 4 | 5 | env: 6 | CARGO_TERM_COLOR: always 7 | 8 | jobs: 9 | test: 10 | name: "${{ matrix.os.name }} ${{ matrix.test.name }} (${{ matrix.toolchain }})" 11 | 12 | strategy: 13 | matrix: 14 | os: 15 | - { name: Linux, distro: ubuntu-latest } 16 | - { name: Windows, distro: windows-latest } 17 | - { name: macOS, distro: macOS-latest } 18 | toolchain: [nightly, beta, stable] 19 | include: 20 | - os: { name: Linux, distro: ubuntu-latest } 21 | toolchain: 1.0.0 22 | 23 | runs-on: ${{ matrix.os.distro }} 24 | 25 | steps: 26 | - name: Checkout Sources 27 | uses: actions/checkout@v2 28 | 29 | - name: Install Rust 30 | uses: actions-rs/toolchain@v1 31 | with: 32 | profile: minimal 33 | toolchain: ${{ matrix.toolchain }} 34 | override: true 35 | 36 | - name: Run Tests 37 | uses: actions-rs/cargo@v1 38 | env: 39 | FORCE_STATIC: 1 40 | KNOWN_CHANNEL: ${{ matrix.toolchain }} 41 | with: 42 | command: test 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | rust: 3 | - 1.0.0 4 | - stable 5 | - beta 6 | - nightly 7 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "version_check" 3 | version = "0.9.5" 4 | authors = ["Sergio Benitez "] 5 | description = "Tiny crate to check the version of the installed/running rustc." 6 | documentation = "https://docs.rs/version_check/" 7 | repository = "https://github.com/SergioBenitez/version_check" 8 | readme = "README.md" 9 | keywords = ["version", "rustc", "minimum", "check"] 10 | license = "MIT/Apache-2.0" 11 | exclude = ["static"] 12 | 13 | [dependencies] 14 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2017-2018 Sergio Benitez 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 8 | the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # version\_check 2 | 3 | [![Build Status](https://github.com/SergioBenitez/version_check/workflows/CI/badge.svg)](https://github.com/SergioBenitez/version_check/actions) 4 | [![Current Crates.io Version](https://img.shields.io/crates/v/version_check.svg)](https://crates.io/crates/version_check) 5 | [![rustdocs on docs.rs](https://docs.rs/version_check/badge.svg)](https://docs.rs/version_check) 6 | 7 | This tiny crate checks that the running or installed `rustc` meets some version 8 | requirements. The version is queried by calling the Rust compiler with 9 | `--version`. The path to the compiler is determined first via the `RUSTC` 10 | environment variable. If it is not set, then `rustc` is used. If that fails, no 11 | determination is made, and calls return `None`. 12 | 13 | ## Usage 14 | 15 | Add to your `Cargo.toml` file, typically as a build dependency: 16 | 17 | ```toml 18 | [build-dependencies] 19 | version_check = "0.9" 20 | ``` 21 | 22 | `version_check` is compatible and compiles with Rust 1.0.0 and beyond. 23 | 24 | ## Examples 25 | 26 | Set a `cfg` flag in `build.rs` if the running compiler was determined to be 27 | at least version `1.13.0`: 28 | 29 | ```rust 30 | extern crate version_check as rustc; 31 | 32 | if rustc::is_min_version("1.13.0").unwrap_or(false) { 33 | println!("cargo:rustc-cfg=question_mark_operator"); 34 | } 35 | ``` 36 | 37 | Check that the running compiler was released on or after `2018-12-18`: 38 | 39 | ```rust 40 | extern crate version_check as rustc; 41 | 42 | match rustc::is_min_date("2018-12-18") { 43 | Some(true) => "Yep! It's recent!", 44 | Some(false) => "No, it's older.", 45 | None => "Couldn't determine the rustc version." 46 | }; 47 | ``` 48 | 49 | Check that the running compiler supports feature flags: 50 | 51 | ```rust 52 | extern crate version_check as rustc; 53 | 54 | match rustc::is_feature_flaggable() { 55 | Some(true) => "Yes! It's a dev or nightly release!", 56 | Some(false) => "No, it's stable or beta.", 57 | None => "Couldn't determine the rustc version." 58 | }; 59 | ``` 60 | 61 | See the [rustdocs](https://docs.rs/version_check) for more examples and complete 62 | documentation. 63 | 64 | ## Alternatives 65 | 66 | This crate is dead simple with no dependencies. If you need something more and 67 | don't care about panicking if the version cannot be obtained, or if you don't 68 | mind adding dependencies, see [rustc_version]. If you'd instead prefer a feature 69 | detection library that works by dynamically invoking `rustc` with a 70 | representative code sample, see [autocfg]. 71 | 72 | [rustc_version]: https://crates.io/crates/rustc_version 73 | [autocfg]: https://crates.io/crates/autocfg 74 | 75 | ## License 76 | 77 | `version_check` is licensed under either of the following, at your option: 78 | 79 | * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) 80 | * MIT License ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) 81 | -------------------------------------------------------------------------------- /src/channel.rs: -------------------------------------------------------------------------------- 1 | use std::fmt; 2 | 3 | #[derive(Debug, PartialEq, Eq, Copy, Clone)] 4 | enum Kind { 5 | Dev, 6 | Nightly, 7 | Beta, 8 | Stable, 9 | } 10 | 11 | /// Release channel: "dev", "nightly", "beta", or "stable". 12 | #[derive(Debug, PartialEq, Eq, Copy, Clone)] 13 | pub struct Channel(Kind); 14 | 15 | impl Channel { 16 | /// Reads the release channel of the running compiler. If it cannot be 17 | /// determined (see the [top-level documentation](crate)), returns `None`. 18 | /// 19 | /// # Example 20 | /// 21 | /// ```rust 22 | /// use version_check::Channel; 23 | /// 24 | /// match Channel::read() { 25 | /// Some(c) => format!("The channel is: {}", c), 26 | /// None => format!("Failed to read the release channel.") 27 | /// }; 28 | /// ``` 29 | pub fn read() -> Option { 30 | ::get_version_and_date() 31 | .and_then(|(version, _)| version) 32 | .and_then(|version| Channel::parse(&version)) 33 | } 34 | 35 | /// Parse a Rust release channel from a Rust release version string (of the 36 | /// form `major[.minor[.patch[-channel]]]`). Returns `None` if `version` is 37 | /// not a valid Rust version string. 38 | /// 39 | /// # Example 40 | /// 41 | /// ```rust 42 | /// use version_check::Channel; 43 | /// 44 | /// let dev = Channel::parse("1.3.0-dev").unwrap(); 45 | /// assert!(dev.is_dev()); 46 | /// 47 | /// let nightly = Channel::parse("1.42.2-nightly").unwrap(); 48 | /// assert!(nightly.is_nightly()); 49 | /// 50 | /// let beta = Channel::parse("1.32.0-beta").unwrap(); 51 | /// assert!(beta.is_beta()); 52 | /// 53 | /// let stable = Channel::parse("1.4.0").unwrap(); 54 | /// assert!(stable.is_stable()); 55 | /// ``` 56 | pub fn parse(version: &str) -> Option { 57 | let version = version.trim(); 58 | if version.contains("-dev") || version == "dev" { 59 | Some(Channel(Kind::Dev)) 60 | } else if version.contains("-nightly") || version == "nightly" { 61 | Some(Channel(Kind::Nightly)) 62 | } else if version.contains("-beta") || version == "beta" { 63 | Some(Channel(Kind::Beta)) 64 | } else if !version.contains("-") { 65 | Some(Channel(Kind::Stable)) 66 | } else { 67 | None 68 | } 69 | } 70 | 71 | /// Returns the name of the release channel. 72 | fn as_str(&self) -> &'static str { 73 | match self.0 { 74 | Kind::Dev => "dev", 75 | Kind::Beta => "beta", 76 | Kind::Nightly => "nightly", 77 | Kind::Stable => "stable", 78 | } 79 | } 80 | 81 | /// Returns `true` if this channel supports feature flags. In other words, 82 | /// returns `true` if the channel is either `dev` or `nightly`. 83 | /// 84 | /// **Please see the note on [feature detection](crate#feature-detection).** 85 | /// 86 | /// # Example 87 | /// 88 | /// ```rust 89 | /// use version_check::Channel; 90 | /// 91 | /// let dev = Channel::parse("1.3.0-dev").unwrap(); 92 | /// assert!(dev.supports_features()); 93 | /// 94 | /// let nightly = Channel::parse("1.42.2-nightly").unwrap(); 95 | /// assert!(nightly.supports_features()); 96 | /// 97 | /// let beta = Channel::parse("1.32.0-beta").unwrap(); 98 | /// assert!(!beta.supports_features()); 99 | /// 100 | /// let stable = Channel::parse("1.4.0").unwrap(); 101 | /// assert!(!stable.supports_features()); 102 | /// ``` 103 | pub fn supports_features(&self) -> bool { 104 | match self.0 { 105 | Kind::Dev | Kind::Nightly => true, 106 | Kind::Beta | Kind::Stable => false 107 | } 108 | } 109 | 110 | /// Returns `true` if this channel is `dev` and `false` otherwise. 111 | /// 112 | /// # Example 113 | /// 114 | /// ```rust 115 | /// use version_check::Channel; 116 | /// 117 | /// let dev = Channel::parse("1.3.0-dev").unwrap(); 118 | /// assert!(dev.is_dev()); 119 | /// 120 | /// let stable = Channel::parse("1.0.0").unwrap(); 121 | /// assert!(!stable.is_dev()); 122 | /// ``` 123 | pub fn is_dev(&self) -> bool { 124 | match self.0 { 125 | Kind::Dev => true, 126 | _ => false 127 | } 128 | } 129 | 130 | /// Returns `true` if this channel is `nightly` and `false` otherwise. 131 | /// 132 | /// # Example 133 | /// 134 | /// ```rust 135 | /// use version_check::Channel; 136 | /// 137 | /// let nightly = Channel::parse("1.3.0-nightly").unwrap(); 138 | /// assert!(nightly.is_nightly()); 139 | /// 140 | /// let stable = Channel::parse("1.0.0").unwrap(); 141 | /// assert!(!stable.is_nightly()); 142 | /// ``` 143 | pub fn is_nightly(&self) -> bool { 144 | match self.0 { 145 | Kind::Nightly => true, 146 | _ => false 147 | } 148 | } 149 | 150 | /// Returns `true` if this channel is `beta` and `false` otherwise. 151 | /// 152 | /// # Example 153 | /// 154 | /// ```rust 155 | /// use version_check::Channel; 156 | /// 157 | /// let beta = Channel::parse("1.3.0-beta").unwrap(); 158 | /// assert!(beta.is_beta()); 159 | /// 160 | /// let stable = Channel::parse("1.0.0").unwrap(); 161 | /// assert!(!stable.is_beta()); 162 | /// ``` 163 | pub fn is_beta(&self) -> bool { 164 | match self.0 { 165 | Kind::Beta => true, 166 | _ => false 167 | } 168 | } 169 | 170 | /// Returns `true` if this channel is `stable` and `false` otherwise. 171 | /// 172 | /// # Example 173 | /// 174 | /// ```rust 175 | /// use version_check::Channel; 176 | /// 177 | /// let stable = Channel::parse("1.0.0").unwrap(); 178 | /// assert!(stable.is_stable()); 179 | /// 180 | /// let beta = Channel::parse("1.3.0-beta").unwrap(); 181 | /// assert!(!beta.is_stable()); 182 | /// ``` 183 | pub fn is_stable(&self) -> bool { 184 | match self.0 { 185 | Kind::Stable => true, 186 | _ => false 187 | } 188 | } 189 | } 190 | 191 | impl fmt::Display for Channel { 192 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 193 | write!(f, "{}", self.as_str()) 194 | } 195 | } 196 | -------------------------------------------------------------------------------- /src/date.rs: -------------------------------------------------------------------------------- 1 | use std::fmt; 2 | 3 | /// Release date including year, month, and day. 4 | // Internal storage is: y[31..9] | m[8..5] | d[5...0]. 5 | #[derive(Debug, PartialEq, Eq, Copy, Clone, PartialOrd, Ord)] 6 | pub struct Date(u32); 7 | 8 | impl Date { 9 | /// Reads the release date of the running compiler. If it cannot be 10 | /// determined (see the [top-level documentation](crate)), returns `None`. 11 | /// 12 | /// # Example 13 | /// 14 | /// ```rust 15 | /// use version_check::Date; 16 | /// 17 | /// match Date::read() { 18 | /// Some(d) => format!("The release date is: {}", d), 19 | /// None => format!("Failed to read the release date.") 20 | /// }; 21 | /// ``` 22 | pub fn read() -> Option { 23 | ::get_version_and_date() 24 | .and_then(|(_, date)| date) 25 | .and_then(|date| Date::parse(&date)) 26 | } 27 | 28 | /// Parse a release date of the form `%Y-%m-%d`. Returns `None` if `date` is 29 | /// not in `%Y-%m-%d` format. 30 | /// 31 | /// # Example 32 | /// 33 | /// ```rust 34 | /// use version_check::Date; 35 | /// 36 | /// let date = Date::parse("2016-04-20").unwrap(); 37 | /// 38 | /// assert!(date.at_least("2016-01-10")); 39 | /// assert!(date.at_most("2016-04-20")); 40 | /// assert!(date.exactly("2016-04-20")); 41 | /// 42 | /// assert!(Date::parse("2021-12-31").unwrap().exactly("2021-12-31")); 43 | /// 44 | /// assert!(Date::parse("March 13, 2018").is_none()); 45 | /// assert!(Date::parse("1-2-3-4-5").is_none()); 46 | /// assert!(Date::parse("2020-300-23120").is_none()); 47 | /// assert!(Date::parse("2020-12-12 1").is_none()); 48 | /// assert!(Date::parse("2020-10").is_none()); 49 | /// assert!(Date::parse("2020").is_none()); 50 | /// ``` 51 | pub fn parse(date: &str) -> Option { 52 | let mut ymd = [0u16; 3]; 53 | for (i, split) in date.split('-').map(|s| s.parse::()).enumerate() { 54 | ymd[i] = match (i, split) { 55 | (3, _) | (_, Err(_)) => return None, 56 | (_, Ok(v)) => v, 57 | }; 58 | } 59 | 60 | let (year, month, day) = (ymd[0], ymd[1], ymd[2]); 61 | if year == 0 || month == 0 || month > 12 || day == 0 || day > 31 { 62 | return None; 63 | } 64 | 65 | Some(Date::from_ymd(year, month as u8, day as u8)) 66 | } 67 | 68 | /// Creates a `Date` from `(year, month, day)` date components. 69 | /// 70 | /// Does not check the validity of `year`, `month`, or `day`, but `year` is 71 | /// truncated to 23 bits (% 8,388,608), `month` to 4 bits (% 16), and `day` 72 | /// to 5 bits (% 32). 73 | /// 74 | /// # Example 75 | /// 76 | /// ```rust 77 | /// use version_check::Date; 78 | /// 79 | /// assert!(Date::from_ymd(2021, 7, 30).exactly("2021-07-30")); 80 | /// assert!(Date::from_ymd(2010, 3, 23).exactly("2010-03-23")); 81 | /// assert!(Date::from_ymd(2090, 1, 31).exactly("2090-01-31")); 82 | /// 83 | /// // Truncation: 33 % 32 == 0x21 & 0x1F == 1. 84 | /// assert!(Date::from_ymd(2090, 1, 33).exactly("2090-01-01")); 85 | /// ``` 86 | pub fn from_ymd(year: u16, month: u8, day: u8) -> Date { 87 | let year = (year as u32) << 9; 88 | let month = ((month as u32) & 0xF) << 5; 89 | let day = (day as u32) & 0x1F; 90 | Date(year | month | day) 91 | } 92 | 93 | /// Return the original (YYYY, MM, DD). 94 | fn to_ymd(&self) -> (u16, u8, u8) { 95 | let y = self.0 >> 9; 96 | let m = (self.0 >> 5) & 0xF; 97 | let d = self.0 & 0x1F; 98 | (y as u16, m as u8, d as u8) 99 | } 100 | 101 | /// Returns `true` if `self` occurs on or after `date`. 102 | /// 103 | /// If `date` occurs before `self`, or if `date` is not in `%Y-%m-%d` 104 | /// format, returns `false`. 105 | /// 106 | /// # Example 107 | /// 108 | /// ```rust 109 | /// use version_check::Date; 110 | /// 111 | /// let date = Date::parse("2020-01-01").unwrap(); 112 | /// 113 | /// assert!(date.at_least("2019-12-31")); 114 | /// assert!(date.at_least("2020-01-01")); 115 | /// assert!(date.at_least("2014-04-31")); 116 | /// 117 | /// assert!(!date.at_least("2020-01-02")); 118 | /// assert!(!date.at_least("2024-08-18")); 119 | /// ``` 120 | pub fn at_least(&self, date: &str) -> bool { 121 | Date::parse(date) 122 | .map(|date| self >= &date) 123 | .unwrap_or(false) 124 | } 125 | 126 | /// Returns `true` if `self` occurs on or before `date`. 127 | /// 128 | /// If `date` occurs after `self`, or if `date` is not in `%Y-%m-%d` 129 | /// format, returns `false`. 130 | /// 131 | /// # Example 132 | /// 133 | /// ```rust 134 | /// use version_check::Date; 135 | /// 136 | /// let date = Date::parse("2020-01-01").unwrap(); 137 | /// 138 | /// assert!(date.at_most("2020-01-01")); 139 | /// assert!(date.at_most("2020-01-02")); 140 | /// assert!(date.at_most("2024-08-18")); 141 | /// 142 | /// assert!(!date.at_most("2019-12-31")); 143 | /// assert!(!date.at_most("2014-04-31")); 144 | /// ``` 145 | pub fn at_most(&self, date: &str) -> bool { 146 | Date::parse(date) 147 | .map(|date| self <= &date) 148 | .unwrap_or(false) 149 | } 150 | 151 | /// Returns `true` if `self` occurs exactly on `date`. 152 | /// 153 | /// If `date` is not exactly `self`, or if `date` is not in `%Y-%m-%d` 154 | /// format, returns `false`. 155 | /// 156 | /// # Example 157 | /// 158 | /// ```rust 159 | /// use version_check::Date; 160 | /// 161 | /// let date = Date::parse("2020-01-01").unwrap(); 162 | /// 163 | /// assert!(date.exactly("2020-01-01")); 164 | /// 165 | /// assert!(!date.exactly("2019-12-31")); 166 | /// assert!(!date.exactly("2014-04-31")); 167 | /// assert!(!date.exactly("2020-01-02")); 168 | /// assert!(!date.exactly("2024-08-18")); 169 | /// ``` 170 | pub fn exactly(&self, date: &str) -> bool { 171 | Date::parse(date) 172 | .map(|date| self == &date) 173 | .unwrap_or(false) 174 | } 175 | } 176 | 177 | impl fmt::Display for Date { 178 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 179 | let (y, m, d) = self.to_ymd(); 180 | write!(f, "{}-{:02}-{:02}", y, m, d) 181 | } 182 | } 183 | 184 | #[cfg(test)] 185 | mod tests { 186 | use super::Date; 187 | 188 | macro_rules! reflexive_display { 189 | ($string:expr) => ( 190 | assert_eq!(Date::parse($string).unwrap().to_string(), $string); 191 | ) 192 | } 193 | 194 | #[test] 195 | fn display() { 196 | reflexive_display!("2019-05-08"); 197 | reflexive_display!("2000-01-01"); 198 | reflexive_display!("2000-12-31"); 199 | reflexive_display!("2090-12-31"); 200 | reflexive_display!("1999-02-19"); 201 | reflexive_display!("9999-12-31"); 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! This tiny crate checks that the running or installed `rustc` meets some 2 | //! version requirements. The version is queried by calling the Rust compiler 3 | //! with `--version`. The path to the compiler is determined first via the 4 | //! `RUSTC` environment variable. If it is not set, then `rustc` is used. If 5 | //! that fails, no determination is made, and calls return `None`. 6 | //! 7 | //! # Examples 8 | //! 9 | //! **Note:** Please see [feature detection] for a note on enabling unstable 10 | //! features based on detection via this crate. 11 | //! 12 | //! [feature detection]: crate#feature-detection 13 | //! 14 | //! * Set a `cfg` flag in `build.rs` if the running compiler was determined to 15 | //! be at least version `1.13.0`: 16 | //! 17 | //! ```rust 18 | //! extern crate version_check as rustc; 19 | //! 20 | //! if rustc::is_min_version("1.13.0").unwrap_or(false) { 21 | //! println!("cargo:rustc-cfg=question_mark_operator"); 22 | //! } 23 | //! ``` 24 | //! 25 | //! See [`is_max_version`] or [`is_exact_version`] to check if the compiler 26 | //! is _at most_ or _exactly_ a certain version. 27 | //!

28 | //! 29 | //! * Check that the running compiler was released on or after `2018-12-18`: 30 | //! 31 | //! ```rust 32 | //! extern crate version_check as rustc; 33 | //! 34 | //! match rustc::is_min_date("2018-12-18") { 35 | //! Some(true) => "Yep! It's recent!", 36 | //! Some(false) => "No, it's older.", 37 | //! None => "Couldn't determine the rustc version." 38 | //! }; 39 | //! ``` 40 | //! 41 | //! See [`is_max_date`] or [`is_exact_date`] to check if the compiler was 42 | //! released _prior to_ or _exactly on_ a certain date. 43 | //!

44 | //! 45 | //! * Check that the running compiler supports feature flags: 46 | //! 47 | //! ```rust 48 | //! extern crate version_check as rustc; 49 | //! 50 | //! match rustc::is_feature_flaggable() { 51 | //! Some(true) => "Yes! It's a dev or nightly release!", 52 | //! Some(false) => "No, it's stable or beta.", 53 | //! None => "Couldn't determine the rustc version." 54 | //! }; 55 | //! ``` 56 | //! 57 | //! Please see the note on [feature detection]. 58 | //!

59 | //! 60 | //! * Check that the running compiler supports a specific feature: 61 | //! 62 | //! ```rust 63 | //! extern crate version_check as rustc; 64 | //! 65 | //! if let Some(true) = rustc::supports_feature("doc_cfg") { 66 | //! println!("cargo:rustc-cfg=has_doc_cfg"); 67 | //! } 68 | //! ``` 69 | //! 70 | //! Please see the note on [feature detection]. 71 | //!

72 | //! 73 | //! * Check that the running compiler is on the stable channel: 74 | //! 75 | //! ```rust 76 | //! extern crate version_check as rustc; 77 | //! 78 | //! match rustc::Channel::read() { 79 | //! Some(c) if c.is_stable() => format!("Yes! It's stable."), 80 | //! Some(c) => format!("No, the channel {} is not stable.", c), 81 | //! None => format!("Couldn't determine the rustc version.") 82 | //! }; 83 | //! ``` 84 | //! 85 | //! To interact with the version, release date, and release channel as structs, 86 | //! use [`Version`], [`Date`], and [`Channel`], respectively. The [`triple()`] 87 | //! function returns all three values efficiently. 88 | //! 89 | //! # Feature Detection 90 | //! 91 | //! While this crate can be used to determine if the current compiler supports 92 | //! an unstable feature, no crate can determine whether that feature will work 93 | //! in a way that you expect ad infinitum. If the feature changes in an 94 | //! incompatible way, then your crate, as well as all of its transitive 95 | //! dependents, will fail to build. As a result, great care should be taken when 96 | //! enabling nightly features even when they're supported by the compiler. 97 | //! 98 | //! One common mitigation used in practice is to make using unstable features 99 | //! transitively opt-in via a crate feature or `cfg` so that broken builds only 100 | //! affect those that explicitly asked for the feature. Another complementary 101 | //! approach is to probe `rustc` at build-time by asking it to compile a small 102 | //! but exemplary program that determines whether the feature works as expected, 103 | //! enabling the feature only if the probe succeeds. Finally, eschewing these 104 | //! recommendations, you should track the `nightly` channel closely to minimize 105 | //! the total impact of a nightly breakages. 106 | //! 107 | //! # Alternatives 108 | //! 109 | //! This crate is dead simple with no dependencies. If you need something more 110 | //! and don't care about panicking if the version cannot be obtained, or if you 111 | //! don't mind adding dependencies, see 112 | //! [rustc_version](https://crates.io/crates/rustc_version). 113 | 114 | #![allow(deprecated)] 115 | 116 | mod version; 117 | mod channel; 118 | mod date; 119 | 120 | use std::env; 121 | use std::process::Command; 122 | 123 | #[doc(inline)] pub use version::*; 124 | #[doc(inline)] pub use channel::*; 125 | #[doc(inline)] pub use date::*; 126 | 127 | /// Parses (version, date) as available from rustc version string. 128 | fn version_and_date_from_rustc_version(s: &str) -> (Option, Option) { 129 | let last_line = s.lines().last().unwrap_or(s); 130 | let mut components = last_line.trim().split(" "); 131 | let version = components.nth(1); 132 | let date = components.filter(|c| c.ends_with(')')).next() 133 | .map(|s| s.trim_right().trim_right_matches(")").trim_left().trim_left_matches('(')); 134 | (version.map(|s| s.to_string()), date.map(|s| s.to_string())) 135 | } 136 | 137 | /// Parses (version, date) as available from rustc verbose version output. 138 | fn version_and_date_from_rustc_verbose_version(s: &str) -> (Option, Option) { 139 | let (mut version, mut date) = (None, None); 140 | for line in s.lines() { 141 | let split = |s: &str| s.splitn(2, ":").nth(1).map(|s| s.trim().to_string()); 142 | match line.trim().split(" ").nth(0) { 143 | Some("rustc") => { 144 | let (v, d) = version_and_date_from_rustc_version(line); 145 | version = version.or(v); 146 | date = date.or(d); 147 | }, 148 | Some("release:") => version = split(line), 149 | Some("commit-date:") if line.ends_with("unknown") => date = None, 150 | Some("commit-date:") => date = split(line), 151 | _ => continue 152 | } 153 | } 154 | 155 | (version, date) 156 | } 157 | 158 | /// Returns (version, date) as available from `rustc --version`. 159 | fn get_version_and_date() -> Option<(Option, Option)> { 160 | let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".to_string()); 161 | Command::new(rustc).arg("--verbose").arg("--version").output().ok() 162 | .and_then(|output| String::from_utf8(output.stdout).ok()) 163 | .map(|s| version_and_date_from_rustc_verbose_version(&s)) 164 | } 165 | 166 | /// Reads the triple of [`Version`], [`Channel`], and [`Date`] of the installed 167 | /// or running `rustc`. 168 | /// 169 | /// If any attribute cannot be determined (see the [top-level 170 | /// documentation](crate)), returns `None`. 171 | /// 172 | /// To obtain only one of three attributes, use [`Version::read()`], 173 | /// [`Channel::read()`], or [`Date::read()`]. 174 | pub fn triple() -> Option<(Version, Channel, Date)> { 175 | let (version_str, date_str) = match get_version_and_date() { 176 | Some((Some(version), Some(date))) => (version, date), 177 | _ => return None 178 | }; 179 | 180 | // Can't use `?` or `try!` for `Option` in 1.0.0. 181 | match Version::parse(&version_str) { 182 | Some(version) => match Channel::parse(&version_str) { 183 | Some(channel) => match Date::parse(&date_str) { 184 | Some(date) => Some((version, channel, date)), 185 | _ => None, 186 | }, 187 | _ => None, 188 | }, 189 | _ => None 190 | } 191 | } 192 | 193 | /// Checks that the running or installed `rustc` was released **on or after** 194 | /// some date. 195 | /// 196 | /// The format of `min_date` must be YYYY-MM-DD. For instance: `2016-12-20` or 197 | /// `2017-01-09`. 198 | /// 199 | /// If the date cannot be retrieved or parsed, or if `min_date` could not be 200 | /// parsed, returns `None`. Otherwise returns `true` if the installed `rustc` 201 | /// was release on or after `min_date` and `false` otherwise. 202 | pub fn is_min_date(min_date: &str) -> Option { 203 | match (Date::read(), Date::parse(min_date)) { 204 | (Some(rustc_date), Some(min_date)) => Some(rustc_date >= min_date), 205 | _ => None 206 | } 207 | } 208 | 209 | /// Checks that the running or installed `rustc` was released **on or before** 210 | /// some date. 211 | /// 212 | /// The format of `max_date` must be YYYY-MM-DD. For instance: `2016-12-20` or 213 | /// `2017-01-09`. 214 | /// 215 | /// If the date cannot be retrieved or parsed, or if `max_date` could not be 216 | /// parsed, returns `None`. Otherwise returns `true` if the installed `rustc` 217 | /// was release on or before `max_date` and `false` otherwise. 218 | pub fn is_max_date(max_date: &str) -> Option { 219 | match (Date::read(), Date::parse(max_date)) { 220 | (Some(rustc_date), Some(max_date)) => Some(rustc_date <= max_date), 221 | _ => None 222 | } 223 | } 224 | 225 | /// Checks that the running or installed `rustc` was released **exactly** on 226 | /// some date. 227 | /// 228 | /// The format of `date` must be YYYY-MM-DD. For instance: `2016-12-20` or 229 | /// `2017-01-09`. 230 | /// 231 | /// If the date cannot be retrieved or parsed, or if `date` could not be parsed, 232 | /// returns `None`. Otherwise returns `true` if the installed `rustc` was 233 | /// release on `date` and `false` otherwise. 234 | pub fn is_exact_date(date: &str) -> Option { 235 | match (Date::read(), Date::parse(date)) { 236 | (Some(rustc_date), Some(date)) => Some(rustc_date == date), 237 | _ => None 238 | } 239 | } 240 | 241 | /// Checks that the running or installed `rustc` is **at least** some minimum 242 | /// version. 243 | /// 244 | /// The format of `min_version` is a semantic version: `1.3.0`, `1.15.0-beta`, 245 | /// `1.14.0`, `1.16.0-nightly`, etc. 246 | /// 247 | /// If the version cannot be retrieved or parsed, or if `min_version` could not 248 | /// be parsed, returns `None`. Otherwise returns `true` if the installed `rustc` 249 | /// is at least `min_version` and `false` otherwise. 250 | pub fn is_min_version(min_version: &str) -> Option { 251 | match (Version::read(), Version::parse(min_version)) { 252 | (Some(rustc_ver), Some(min_ver)) => Some(rustc_ver >= min_ver), 253 | _ => None 254 | } 255 | } 256 | 257 | /// Checks that the running or installed `rustc` is **at most** some maximum 258 | /// version. 259 | /// 260 | /// The format of `max_version` is a semantic version: `1.3.0`, `1.15.0-beta`, 261 | /// `1.14.0`, `1.16.0-nightly`, etc. 262 | /// 263 | /// If the version cannot be retrieved or parsed, or if `max_version` could not 264 | /// be parsed, returns `None`. Otherwise returns `true` if the installed `rustc` 265 | /// is at most `max_version` and `false` otherwise. 266 | pub fn is_max_version(max_version: &str) -> Option { 267 | match (Version::read(), Version::parse(max_version)) { 268 | (Some(rustc_ver), Some(max_ver)) => Some(rustc_ver <= max_ver), 269 | _ => None 270 | } 271 | } 272 | 273 | /// Checks that the running or installed `rustc` is **exactly** some version. 274 | /// 275 | /// The format of `version` is a semantic version: `1.3.0`, `1.15.0-beta`, 276 | /// `1.14.0`, `1.16.0-nightly`, etc. 277 | /// 278 | /// If the version cannot be retrieved or parsed, or if `version` could not be 279 | /// parsed, returns `None`. Otherwise returns `true` if the installed `rustc` is 280 | /// exactly `version` and `false` otherwise. 281 | pub fn is_exact_version(version: &str) -> Option { 282 | match (Version::read(), Version::parse(version)) { 283 | (Some(rustc_ver), Some(version)) => Some(rustc_ver == version), 284 | _ => None 285 | } 286 | } 287 | 288 | /// Checks whether the running or installed `rustc` supports feature flags. 289 | /// 290 | /// Returns true if the channel is either "nightly" or "dev". 291 | /// 292 | /// **Please see the note on [feature detection](crate#feature-detection).** 293 | /// 294 | /// Note that support for specific `rustc` features can be enabled or disabled 295 | /// via the `allow-features` compiler flag, which this function _does not_ 296 | /// check. That is, this function _does not_ check whether a _specific_ feature 297 | /// is supported, but instead whether features are supported at all. To check 298 | /// for support for a specific feature, use [`supports_feature()`]. 299 | /// 300 | /// If the version could not be determined, returns `None`. Otherwise returns 301 | /// `true` if the running version supports feature flags and `false` otherwise. 302 | pub fn is_feature_flaggable() -> Option { 303 | Channel::read().map(|c| c.supports_features()) 304 | } 305 | 306 | /// Checks whether the running or installed `rustc` supports `feature`. 307 | /// 308 | /// **Please see the note on [feature detection](crate#feature-detection).** 309 | /// 310 | /// Returns _true_ _iff_ [`is_feature_flaggable()`] returns `true` _and_ the 311 | /// feature is not disabled via exclusion in `allow-features` via `RUSTFLAGS` or 312 | /// `CARGO_ENCODED_RUSTFLAGS`. If the version could not be determined, returns 313 | /// `None`. 314 | /// 315 | /// # Example 316 | /// 317 | /// ```rust 318 | /// use version_check as rustc; 319 | /// 320 | /// if let Some(true) = rustc::supports_feature("doc_cfg") { 321 | /// println!("cargo:rustc-cfg=has_doc_cfg"); 322 | /// } 323 | /// ``` 324 | pub fn supports_feature(feature: &str) -> Option { 325 | match is_feature_flaggable() { 326 | Some(true) => { /* continue */ } 327 | Some(false) => return Some(false), 328 | None => return None, 329 | } 330 | 331 | let env_flags = env::var_os("CARGO_ENCODED_RUSTFLAGS") 332 | .map(|flags| (flags, '\x1f')) 333 | .or_else(|| env::var_os("RUSTFLAGS").map(|flags| (flags, ' '))); 334 | 335 | if let Some((flags, delim)) = env_flags { 336 | const ALLOW_FEATURES: &'static str = "allow-features="; 337 | 338 | let rustflags = flags.to_string_lossy(); 339 | let allow_features = rustflags.split(delim) 340 | .map(|flag| flag.trim_left_matches("-Z").trim()) 341 | .filter(|flag| flag.starts_with(ALLOW_FEATURES)) 342 | .map(|flag| &flag[ALLOW_FEATURES.len()..]); 343 | 344 | if let Some(allow_features) = allow_features.last() { 345 | return Some(allow_features.split(',').any(|f| f.trim() == feature)); 346 | } 347 | } 348 | 349 | // If there are no `RUSTFLAGS` or `CARGO_ENCODED_RUSTFLAGS` or they don't 350 | // contain an `allow-features` flag, assume compiler allows all features. 351 | Some(true) 352 | } 353 | 354 | #[cfg(test)] 355 | mod tests { 356 | use std::{env, fs}; 357 | 358 | use super::version_and_date_from_rustc_version; 359 | use super::version_and_date_from_rustc_verbose_version; 360 | 361 | macro_rules! check_parse { 362 | (@ $f:expr, $s:expr => $v:expr, $d:expr) => ({ 363 | if let (Some(v), d) = $f(&$s) { 364 | let e_d: Option<&str> = $d.into(); 365 | assert_eq!((v, d), ($v.to_string(), e_d.map(|s| s.into()))); 366 | } else { 367 | panic!("{:?} didn't parse for version testing.", $s); 368 | } 369 | }); 370 | ($f:expr, $s:expr => $v:expr, $d:expr) => ({ 371 | let warn = "warning: invalid logging spec 'warning', ignoring it"; 372 | let warn2 = "warning: sorry, something went wrong :(sad)"; 373 | check_parse!(@ $f, $s => $v, $d); 374 | check_parse!(@ $f, &format!("{}\n{}", warn, $s) => $v, $d); 375 | check_parse!(@ $f, &format!("{}\n{}", warn2, $s) => $v, $d); 376 | check_parse!(@ $f, &format!("{}\n{}\n{}", warn, warn2, $s) => $v, $d); 377 | check_parse!(@ $f, &format!("{}\n{}\n{}", warn2, warn, $s) => $v, $d); 378 | }) 379 | } 380 | 381 | macro_rules! check_terse_parse { 382 | ($($s:expr => $v:expr, $d:expr,)+) => {$( 383 | check_parse!(version_and_date_from_rustc_version, $s => $v, $d); 384 | )+} 385 | } 386 | 387 | macro_rules! check_verbose_parse { 388 | ($($s:expr => $v:expr, $d:expr,)+) => {$( 389 | check_parse!(version_and_date_from_rustc_verbose_version, $s => $v, $d); 390 | )+} 391 | } 392 | 393 | #[test] 394 | fn test_version_parse() { 395 | check_terse_parse! { 396 | "rustc 1.18.0" => "1.18.0", None, 397 | "rustc 1.8.0" => "1.8.0", None, 398 | "rustc 1.20.0-nightly" => "1.20.0-nightly", None, 399 | "rustc 1.20" => "1.20", None, 400 | "rustc 1.3" => "1.3", None, 401 | "rustc 1" => "1", None, 402 | "rustc 1.5.1-beta" => "1.5.1-beta", None, 403 | "rustc 1.20.0 (2017-07-09)" => "1.20.0", Some("2017-07-09"), 404 | "rustc 1.20.0-dev (2017-07-09)" => "1.20.0-dev", Some("2017-07-09"), 405 | "rustc 1.20.0-nightly (d84693b93 2017-07-09)" => "1.20.0-nightly", Some("2017-07-09"), 406 | "rustc 1.20.0 (d84693b93 2017-07-09)" => "1.20.0", Some("2017-07-09"), 407 | "rustc 1.30.0-nightly (3bc2ca7e4 2018-09-20)" => "1.30.0-nightly", Some("2018-09-20"), 408 | }; 409 | } 410 | 411 | #[test] 412 | fn test_verbose_version_parse() { 413 | check_verbose_parse! { 414 | "rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)\n\ 415 | binary: rustc\n\ 416 | commit-hash: a59de37e99060162a2674e3ff45409ac73595c0e\n\ 417 | commit-date: 2015-05-13\n\ 418 | build-date: 2015-05-14\n\ 419 | host: x86_64-unknown-linux-gnu\n\ 420 | release: 1.0.0" => "1.0.0", Some("2015-05-13"), 421 | 422 | "rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)\n\ 423 | commit-hash: a59de37e99060162a2674e3ff45409ac73595c0e\n\ 424 | commit-date: 2015-05-13\n\ 425 | build-date: 2015-05-14\n\ 426 | host: x86_64-unknown-linux-gnu\n\ 427 | release: 1.0.0" => "1.0.0", Some("2015-05-13"), 428 | 429 | "rustc 1.50.0 (cb75ad5db 2021-02-10)\n\ 430 | binary: rustc\n\ 431 | commit-hash: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\n\ 432 | commit-date: 2021-02-10\n\ 433 | host: x86_64-unknown-linux-gnu\n\ 434 | release: 1.50.0" => "1.50.0", Some("2021-02-10"), 435 | 436 | "rustc 1.52.0-nightly (234781afe 2021-03-07)\n\ 437 | binary: rustc\n\ 438 | commit-hash: 234781afe33d3f339b002f85f948046d8476cfc9\n\ 439 | commit-date: 2021-03-07\n\ 440 | host: x86_64-unknown-linux-gnu\n\ 441 | release: 1.52.0-nightly\n\ 442 | LLVM version: 12.0.0" => "1.52.0-nightly", Some("2021-03-07"), 443 | 444 | "rustc 1.41.1\n\ 445 | binary: rustc\n\ 446 | commit-hash: unknown\n\ 447 | commit-date: unknown\n\ 448 | host: x86_64-unknown-linux-gnu\n\ 449 | release: 1.41.1\n\ 450 | LLVM version: 7.0" => "1.41.1", None, 451 | 452 | "rustc 1.49.0\n\ 453 | binary: rustc\n\ 454 | commit-hash: unknown\n\ 455 | commit-date: unknown\n\ 456 | host: x86_64-unknown-linux-gnu\n\ 457 | release: 1.49.0" => "1.49.0", None, 458 | 459 | "rustc 1.50.0 (Fedora 1.50.0-1.fc33)\n\ 460 | binary: rustc\n\ 461 | commit-hash: unknown\n\ 462 | commit-date: unknown\n\ 463 | host: x86_64-unknown-linux-gnu\n\ 464 | release: 1.50.0" => "1.50.0", None, 465 | }; 466 | } 467 | 468 | fn read_static(verbose: bool, channel: &str, minor: usize) -> String { 469 | use std::fs::File; 470 | use std::path::Path; 471 | use std::io::{BufReader, Read}; 472 | 473 | let subdir = if verbose { "verbose" } else { "terse" }; 474 | let path = Path::new(STATIC_PATH) 475 | .join(channel) 476 | .join(subdir) 477 | .join(format!("rustc-1.{}.0", minor)); 478 | 479 | let file = File::open(path).unwrap(); 480 | let mut buf_reader = BufReader::new(file); 481 | let mut contents = String::new(); 482 | buf_reader.read_to_string(&mut contents).unwrap(); 483 | contents 484 | } 485 | 486 | static STATIC_PATH: &'static str = concat!(env!("CARGO_MANIFEST_DIR"), "/static"); 487 | 488 | static DATES: [&'static str; 51] = [ 489 | "2015-05-13", "2015-06-19", "2015-08-03", "2015-09-15", "2015-10-27", 490 | "2015-12-04", "2016-01-19", "2016-02-29", "2016-04-11", "2016-05-18", 491 | "2016-07-03", "2016-08-15", "2016-09-23", "2016-11-07", "2016-12-16", 492 | "2017-01-19", "2017-03-10", "2017-04-24", "2017-06-06", "2017-07-17", 493 | "2017-08-27", "2017-10-09", "2017-11-20", "2018-01-01", "2018-02-12", 494 | "2018-03-25", "2018-05-07", "2018-06-19", "2018-07-30", "2018-09-11", 495 | "2018-10-24", "2018-12-04", "2019-01-16", "2019-02-28", "2019-04-10", 496 | "2019-05-20", "2019-07-03", "2019-08-13", "2019-09-23", "2019-11-04", 497 | "2019-12-16", "2020-01-27", "2020-03-09", "2020-04-20", "2020-06-01", 498 | "2020-07-13", "2020-08-24", "2020-10-07", "2020-11-16", "2020-12-29", 499 | "2021-02-10", 500 | ]; 501 | 502 | #[test] 503 | fn test_stable_compatibility() { 504 | if env::var_os("FORCE_STATIC").is_none() && fs::metadata(STATIC_PATH).is_err() { 505 | // We exclude `/static` when we package `version_check`, so don't 506 | // run if static files aren't present unless we know they should be. 507 | return; 508 | } 509 | 510 | // Ensure we can parse all output from all Linux stable releases. 511 | for v in 0..DATES.len() { 512 | let (version, date) = (&format!("1.{}.0", v), Some(DATES[v])); 513 | check_terse_parse!(read_static(false, "stable", v) => version, date,); 514 | check_verbose_parse!(read_static(true, "stable", v) => version, date,); 515 | } 516 | } 517 | 518 | #[test] 519 | fn test_parse_current() { 520 | let (version, channel) = (::Version::read(), ::Channel::read()); 521 | assert!(version.is_some()); 522 | assert!(channel.is_some()); 523 | 524 | if let Ok(known_channel) = env::var("KNOWN_CHANNEL") { 525 | assert_eq!(channel, ::Channel::parse(&known_channel)); 526 | } 527 | } 528 | } 529 | -------------------------------------------------------------------------------- /src/version.rs: -------------------------------------------------------------------------------- 1 | use std::fmt; 2 | 3 | /// Version number: `major.minor.patch`, ignoring release channel. 4 | #[derive(PartialEq, Eq, Copy, Clone, PartialOrd, Ord)] 5 | pub struct Version(u64); 6 | 7 | impl Version { 8 | /// Reads the version of the running compiler. If it cannot be determined 9 | /// (see the [top-level documentation](crate)), returns `None`. 10 | /// 11 | /// # Example 12 | /// 13 | /// ```rust 14 | /// use version_check::Version; 15 | /// 16 | /// match Version::read() { 17 | /// Some(d) => format!("Version is: {}", d), 18 | /// None => format!("Failed to read the version.") 19 | /// }; 20 | /// ``` 21 | pub fn read() -> Option { 22 | ::get_version_and_date() 23 | .and_then(|(version, _)| version) 24 | .and_then(|version| Version::parse(&version)) 25 | } 26 | 27 | 28 | /// Parse a Rust release version (of the form 29 | /// `major[.minor[.patch[-channel]]]`), ignoring the release channel, if 30 | /// any. Returns `None` if `version` is not a valid Rust version string. 31 | /// 32 | /// # Example 33 | /// 34 | /// ```rust 35 | /// use version_check::Version; 36 | /// 37 | /// let version = Version::parse("1.18.0").unwrap(); 38 | /// assert!(version.exactly("1.18.0")); 39 | /// 40 | /// let version = Version::parse("1.20.0-nightly").unwrap(); 41 | /// assert!(version.exactly("1.20.0")); 42 | /// assert!(version.exactly("1.20.0-beta")); 43 | /// 44 | /// let version = Version::parse("1.3").unwrap(); 45 | /// assert!(version.exactly("1.3.0")); 46 | /// 47 | /// let version = Version::parse("1").unwrap(); 48 | /// assert!(version.exactly("1.0.0")); 49 | /// 50 | /// assert!(Version::parse("one.two.three").is_none()); 51 | /// assert!(Version::parse("1.65536.2").is_none()); 52 | /// assert!(Version::parse("1. 2").is_none()); 53 | /// assert!(Version::parse("").is_none()); 54 | /// assert!(Version::parse("1.").is_none()); 55 | /// assert!(Version::parse("1.2.3.4").is_none()); 56 | /// ``` 57 | pub fn parse(version: &str) -> Option { 58 | let splits = version.split('-') 59 | .nth(0) 60 | .unwrap_or("") 61 | .split('.') 62 | .map(|s| s.parse::()); 63 | 64 | let mut mmp = [0u16; 3]; 65 | for (i, split) in splits.enumerate() { 66 | mmp[i] = match (i, split) { 67 | (3, _) | (_, Err(_)) => return None, 68 | (_, Ok(v)) => v, 69 | }; 70 | } 71 | 72 | let (maj, min, patch) = (mmp[0], mmp[1], mmp[2]); 73 | Some(Version::from_mmp(maj, min, patch)) 74 | } 75 | 76 | /// Creates a `Version` from `(major, minor, patch)` version components. 77 | /// 78 | /// # Example 79 | /// 80 | /// ```rust 81 | /// use version_check::Version; 82 | /// 83 | /// assert!(Version::from_mmp(1, 35, 0).exactly("1.35.0")); 84 | /// assert!(Version::from_mmp(1, 33, 0).exactly("1.33.0")); 85 | /// assert!(Version::from_mmp(1, 35, 1).exactly("1.35.1")); 86 | /// assert!(Version::from_mmp(1, 13, 2).exactly("1.13.2")); 87 | /// ``` 88 | pub fn from_mmp(major: u16, minor: u16, patch: u16) -> Version { 89 | Version(((major as u64) << 32) | ((minor as u64) << 16) | patch as u64) 90 | } 91 | 92 | /// Returns the `(major, minor, patch)` version components of `self`. 93 | /// 94 | /// # Example 95 | /// 96 | /// ```rust 97 | /// use version_check::Version; 98 | /// 99 | /// assert_eq!(Version::parse("1.35.0").unwrap().to_mmp(), (1, 35, 0)); 100 | /// assert_eq!(Version::parse("1.33.0").unwrap().to_mmp(), (1, 33, 0)); 101 | /// assert_eq!(Version::parse("1.35.1").unwrap().to_mmp(), (1, 35, 1)); 102 | /// assert_eq!(Version::parse("1.13.2").unwrap().to_mmp(), (1, 13, 2)); 103 | /// ``` 104 | pub fn to_mmp(&self) -> (u16, u16, u16) { 105 | let major = self.0 >> 32; 106 | let minor = self.0 >> 16; 107 | let patch = self.0; 108 | (major as u16, minor as u16, patch as u16) 109 | } 110 | 111 | /// Returns `true` if `self` is greater than or equal to `version`. 112 | /// 113 | /// If `version` is greater than `self`, or if `version` is not a valid Rust 114 | /// version string, returns `false`. 115 | /// 116 | /// # Example 117 | /// 118 | /// ```rust 119 | /// use version_check::Version; 120 | /// 121 | /// let version = Version::parse("1.35.0").unwrap(); 122 | /// 123 | /// assert!(version.at_least("1.33.0")); 124 | /// assert!(version.at_least("1.35.0")); 125 | /// assert!(version.at_least("1.13.2")); 126 | /// 127 | /// assert!(!version.at_least("1.35.1")); 128 | /// assert!(!version.at_least("1.55.0")); 129 | /// 130 | /// let version = Version::parse("1.12.5").unwrap(); 131 | /// 132 | /// assert!(version.at_least("1.12.0")); 133 | /// assert!(!version.at_least("1.35.0")); 134 | /// ``` 135 | pub fn at_least(&self, version: &str) -> bool { 136 | Version::parse(version) 137 | .map(|version| self >= &version) 138 | .unwrap_or(false) 139 | } 140 | 141 | /// Returns `true` if `self` is less than or equal to `version`. 142 | /// 143 | /// If `version` is less than `self`, or if `version` is not a valid Rust 144 | /// version string, returns `false`. 145 | /// 146 | /// # Example 147 | /// 148 | /// ```rust 149 | /// use version_check::Version; 150 | /// 151 | /// let version = Version::parse("1.35.0").unwrap(); 152 | /// 153 | /// assert!(version.at_most("1.35.1")); 154 | /// assert!(version.at_most("1.55.0")); 155 | /// assert!(version.at_most("1.35.0")); 156 | /// 157 | /// assert!(!version.at_most("1.33.0")); 158 | /// assert!(!version.at_most("1.13.2")); 159 | /// ``` 160 | pub fn at_most(&self, version: &str) -> bool { 161 | Version::parse(version) 162 | .map(|version| self <= &version) 163 | .unwrap_or(false) 164 | } 165 | 166 | /// Returns `true` if `self` is exactly equal to `version`. 167 | /// 168 | /// If `version` is not equal to `self`, or if `version` is not a valid Rust 169 | /// version string, returns `false`. 170 | /// 171 | /// # Example 172 | /// 173 | /// ```rust 174 | /// use version_check::Version; 175 | /// 176 | /// let version = Version::parse("1.35.0").unwrap(); 177 | /// 178 | /// assert!(version.exactly("1.35.0")); 179 | /// 180 | /// assert!(!version.exactly("1.33.0")); 181 | /// assert!(!version.exactly("1.35.1")); 182 | /// assert!(!version.exactly("1.13.2")); 183 | /// ``` 184 | pub fn exactly(&self, version: &str) -> bool { 185 | Version::parse(version) 186 | .map(|version| self == &version) 187 | .unwrap_or(false) 188 | } 189 | } 190 | 191 | impl fmt::Display for Version { 192 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 193 | let (major, minor, patch) = self.to_mmp(); 194 | write!(f, "{}.{}.{}", major, minor, patch) 195 | } 196 | } 197 | 198 | impl fmt::Debug for Version { 199 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 200 | // We don't use `debug_*` because it's not available in `1.0.0`. 201 | write!(f, "Version({:?}, {:?})", self.0, self.to_mmp()) 202 | } 203 | } 204 | 205 | #[cfg(test)] 206 | mod tests { 207 | use super::Version; 208 | 209 | macro_rules! assert_to_mmp { 210 | // We don't use `.into::>` because it's not available in 1.0. 211 | // We don't use the message part of `assert!` for the same reason. 212 | ($s:expr, None) => ( 213 | assert_eq!(Version::parse($s), None); 214 | ); 215 | ($s:expr, $mmp:expr) => ( 216 | assert_eq!(Version::parse($s).map(|v| v.to_mmp()), Some($mmp)); 217 | ) 218 | } 219 | 220 | macro_rules! assert_from_mmp { 221 | (($x:expr, $y:expr, $z:expr) => $s:expr) => { 222 | assert_eq!(Some(Version::from_mmp($x, $y, $z)), Version::parse($s)); 223 | }; 224 | } 225 | 226 | #[test] 227 | fn test_str_to_mmp() { 228 | assert_to_mmp!("1", (1, 0, 0)); 229 | assert_to_mmp!("1.2", (1, 2, 0)); 230 | assert_to_mmp!("1.18.0", (1, 18, 0)); 231 | assert_to_mmp!("3.19.0", (3, 19, 0)); 232 | assert_to_mmp!("1.19.0-nightly", (1, 19, 0)); 233 | assert_to_mmp!("1.12.2349", (1, 12, 2349)); 234 | assert_to_mmp!("0.12", (0, 12, 0)); 235 | assert_to_mmp!("1.12.5", (1, 12, 5)); 236 | assert_to_mmp!("1.12", (1, 12, 0)); 237 | assert_to_mmp!("1", (1, 0, 0)); 238 | assert_to_mmp!("1.4.4-nightly (d84693b93 2017-07-09))", (1, 4, 4)); 239 | assert_to_mmp!("1.58879.4478-dev", (1, 58879, 4478)); 240 | assert_to_mmp!("1.58879.4478-dev (d84693b93 2017-07-09))", (1, 58879, 4478)); 241 | } 242 | 243 | #[test] 244 | fn test_malformed() { 245 | assert_to_mmp!("1.65536.2", None); 246 | assert_to_mmp!("-1.2.3", None); 247 | assert_to_mmp!("1. 2", None); 248 | assert_to_mmp!("", None); 249 | assert_to_mmp!(" ", None); 250 | assert_to_mmp!(".", None); 251 | assert_to_mmp!("one", None); 252 | assert_to_mmp!("1.", None); 253 | assert_to_mmp!("1.2.3.4.5.6", None); 254 | } 255 | 256 | #[test] 257 | fn test_from_mmp() { 258 | assert_from_mmp!((1, 18, 0) => "1.18.0"); 259 | assert_from_mmp!((3, 19, 0) => "3.19.0"); 260 | assert_from_mmp!((1, 19, 0) => "1.19.0"); 261 | assert_from_mmp!((1, 12, 2349) => "1.12.2349"); 262 | assert_from_mmp!((0, 12, 0) => "0.12"); 263 | assert_from_mmp!((1, 12, 5) => "1.12.5"); 264 | assert_from_mmp!((1, 12, 0) => "1.12"); 265 | assert_from_mmp!((1, 0, 0) => "1"); 266 | assert_from_mmp!((1, 4, 4) => "1.4.4"); 267 | assert_from_mmp!((1, 58879, 4478) => "1.58879.4478"); 268 | } 269 | 270 | #[test] 271 | fn test_comparisons() { 272 | let version = Version::parse("1.18.0").unwrap(); 273 | assert!(version.exactly("1.18.0")); 274 | assert!(version.at_least("1.12.0")); 275 | assert!(version.at_least("1.12")); 276 | assert!(version.at_least("1")); 277 | assert!(version.at_most("1.18.1")); 278 | assert!(!version.exactly("1.19.0")); 279 | assert!(!version.exactly("1.18.1")); 280 | 281 | let version = Version::parse("1.20.0-nightly").unwrap(); 282 | assert!(version.exactly("1.20.0-beta")); 283 | assert!(version.exactly("1.20.0-nightly")); 284 | assert!(version.exactly("1.20.0")); 285 | assert!(!version.exactly("1.19")); 286 | 287 | let version = Version::parse("1.3").unwrap(); 288 | assert!(version.exactly("1.3.0")); 289 | assert!(version.exactly("1.3.0-stable")); 290 | assert!(version.exactly("1.3")); 291 | assert!(!version.exactly("1.5.0-stable")); 292 | 293 | let version = Version::parse("1").unwrap(); 294 | assert!(version.exactly("1.0.0")); 295 | assert!(version.exactly("1.0")); 296 | assert!(version.exactly("1")); 297 | 298 | assert!(Version::parse("one.two.three").is_none()); 299 | } 300 | 301 | macro_rules! reflexive_display { 302 | ($s:expr) => ( 303 | assert_eq!(Version::parse($s).unwrap().to_string(), $s); 304 | ) 305 | } 306 | 307 | #[test] 308 | fn display() { 309 | reflexive_display!("1.0.0"); 310 | reflexive_display!("1.2.3"); 311 | reflexive_display!("1.12.1438"); 312 | reflexive_display!("1.44.0"); 313 | reflexive_display!("2.44.0"); 314 | reflexive_display!("23459.28923.3483"); 315 | } 316 | } 317 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.0.0: -------------------------------------------------------------------------------- 1 | rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.1.0: -------------------------------------------------------------------------------- 1 | rustc 1.1.0 (35ceea399 2015-06-19) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.10.0: -------------------------------------------------------------------------------- 1 | rustc 1.10.0 (cfcb716cf 2016-07-03) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.11.0: -------------------------------------------------------------------------------- 1 | rustc 1.11.0 (9b21dcd6a 2016-08-15) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.12.0: -------------------------------------------------------------------------------- 1 | rustc 1.12.0 (3191fbae9 2016-09-23) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.13.0: -------------------------------------------------------------------------------- 1 | rustc 1.13.0 (2c6933acc 2016-11-07) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.14.0: -------------------------------------------------------------------------------- 1 | rustc 1.14.0 (e8a012324 2016-12-16) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.15.0: -------------------------------------------------------------------------------- 1 | rustc 1.15.0 (10893a9a3 2017-01-19) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.16.0: -------------------------------------------------------------------------------- 1 | rustc 1.16.0 (30cf806ef 2017-03-10) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.17.0: -------------------------------------------------------------------------------- 1 | rustc 1.17.0 (56124baa9 2017-04-24) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.18.0: -------------------------------------------------------------------------------- 1 | rustc 1.18.0 (03fc9d622 2017-06-06) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.19.0: -------------------------------------------------------------------------------- 1 | rustc 1.19.0 (0ade33941 2017-07-17) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.2.0: -------------------------------------------------------------------------------- 1 | rustc 1.2.0 (082e47636 2015-08-03) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.20.0: -------------------------------------------------------------------------------- 1 | rustc 1.20.0 (f3d6973f4 2017-08-27) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.21.0: -------------------------------------------------------------------------------- 1 | rustc 1.21.0 (3b72af97e 2017-10-09) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.22.0: -------------------------------------------------------------------------------- 1 | rustc 1.22.0 (9c21f8ff4 2017-11-20) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.23.0: -------------------------------------------------------------------------------- 1 | rustc 1.23.0 (766bd11c8 2018-01-01) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.24.0: -------------------------------------------------------------------------------- 1 | rustc 1.24.0 (4d90ac38c 2018-02-12) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.25.0: -------------------------------------------------------------------------------- 1 | rustc 1.25.0 (84203cac6 2018-03-25) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.26.0: -------------------------------------------------------------------------------- 1 | rustc 1.26.0 (a77568041 2018-05-07) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.27.0: -------------------------------------------------------------------------------- 1 | rustc 1.27.0 (3eda71b00 2018-06-19) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.28.0: -------------------------------------------------------------------------------- 1 | rustc 1.28.0 (9634041f0 2018-07-30) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.29.0: -------------------------------------------------------------------------------- 1 | rustc 1.29.0 (aa3ca1994 2018-09-11) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.3.0: -------------------------------------------------------------------------------- 1 | rustc 1.3.0 (9a92aaf19 2015-09-15) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.30.0: -------------------------------------------------------------------------------- 1 | rustc 1.30.0 (da5f414c2 2018-10-24) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.31.0: -------------------------------------------------------------------------------- 1 | rustc 1.31.0 (abe02cefd 2018-12-04) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.32.0: -------------------------------------------------------------------------------- 1 | rustc 1.32.0 (9fda7c223 2019-01-16) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.33.0: -------------------------------------------------------------------------------- 1 | rustc 1.33.0 (2aa4c46cf 2019-02-28) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.34.0: -------------------------------------------------------------------------------- 1 | rustc 1.34.0 (91856ed52 2019-04-10) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.35.0: -------------------------------------------------------------------------------- 1 | rustc 1.35.0 (3c235d560 2019-05-20) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.36.0: -------------------------------------------------------------------------------- 1 | rustc 1.36.0 (a53f9df32 2019-07-03) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.37.0: -------------------------------------------------------------------------------- 1 | rustc 1.37.0 (eae3437df 2019-08-13) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.38.0: -------------------------------------------------------------------------------- 1 | rustc 1.38.0 (625451e37 2019-09-23) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.39.0: -------------------------------------------------------------------------------- 1 | rustc 1.39.0 (4560ea788 2019-11-04) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.4.0: -------------------------------------------------------------------------------- 1 | rustc 1.4.0 (8ab8581f6 2015-10-27) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.40.0: -------------------------------------------------------------------------------- 1 | rustc 1.40.0 (73528e339 2019-12-16) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.41.0: -------------------------------------------------------------------------------- 1 | rustc 1.41.0 (5e1a79984 2020-01-27) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.42.0: -------------------------------------------------------------------------------- 1 | rustc 1.42.0 (b8cedc004 2020-03-09) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.43.0: -------------------------------------------------------------------------------- 1 | rustc 1.43.0 (4fb7144ed 2020-04-20) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.44.0: -------------------------------------------------------------------------------- 1 | rustc 1.44.0 (49cae5576 2020-06-01) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.45.0: -------------------------------------------------------------------------------- 1 | rustc 1.45.0 (5c1f21c3b 2020-07-13) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.46.0: -------------------------------------------------------------------------------- 1 | rustc 1.46.0 (04488afe3 2020-08-24) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.47.0: -------------------------------------------------------------------------------- 1 | rustc 1.47.0 (18bf6b4f0 2020-10-07) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.48.0: -------------------------------------------------------------------------------- 1 | rustc 1.48.0 (7eac88abb 2020-11-16) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.49.0: -------------------------------------------------------------------------------- 1 | rustc 1.49.0 (e1884a8e3 2020-12-29) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.5.0: -------------------------------------------------------------------------------- 1 | rustc 1.5.0 (3d7cd77e4 2015-12-04) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.50.0: -------------------------------------------------------------------------------- 1 | rustc 1.50.0 (cb75ad5db 2021-02-10) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.6.0: -------------------------------------------------------------------------------- 1 | rustc 1.6.0 (c30b771ad 2016-01-19) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.7.0: -------------------------------------------------------------------------------- 1 | rustc 1.7.0 (a5d1e7a59 2016-02-29) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.8.0: -------------------------------------------------------------------------------- 1 | rustc 1.8.0 (db2939409 2016-04-11) 2 | -------------------------------------------------------------------------------- /static/stable/terse/rustc-1.9.0: -------------------------------------------------------------------------------- 1 | rustc 1.9.0 (e4e8b6668 2016-05-18) 2 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.0.0: -------------------------------------------------------------------------------- 1 | rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14) 2 | binary: rustc 3 | commit-hash: a59de37e99060162a2674e3ff45409ac73595c0e 4 | commit-date: 2015-05-13 5 | build-date: 2015-05-14 6 | host: x86_64-unknown-linux-gnu 7 | release: 1.0.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.1.0: -------------------------------------------------------------------------------- 1 | rustc 1.1.0 (35ceea399 2015-06-19) 2 | binary: rustc 3 | commit-hash: 35ceea3997c79a3b7562e89b462ab76af5b86b22 4 | commit-date: 2015-06-19 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.1.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.10.0: -------------------------------------------------------------------------------- 1 | rustc 1.10.0 (cfcb716cf 2016-07-03) 2 | binary: rustc 3 | commit-hash: cfcb716cf0961a7e3a4eceac828d94805cf8140b 4 | commit-date: 2016-07-03 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.10.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.11.0: -------------------------------------------------------------------------------- 1 | rustc 1.11.0 (9b21dcd6a 2016-08-15) 2 | binary: rustc 3 | commit-hash: 9b21dcd6a89f38e8ceccb2ede8c9027cb409f6e3 4 | commit-date: 2016-08-15 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.11.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.12.0: -------------------------------------------------------------------------------- 1 | rustc 1.12.0 (3191fbae9 2016-09-23) 2 | binary: rustc 3 | commit-hash: 3191fbae9da539442351f883bdabcad0d72efcb6 4 | commit-date: 2016-09-23 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.12.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.13.0: -------------------------------------------------------------------------------- 1 | rustc 1.13.0 (2c6933acc 2016-11-07) 2 | binary: rustc 3 | commit-hash: 2c6933acc05c61e041be764cb1331f6281993f3f 4 | commit-date: 2016-11-07 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.13.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.14.0: -------------------------------------------------------------------------------- 1 | rustc 1.14.0 (e8a012324 2016-12-16) 2 | binary: rustc 3 | commit-hash: e8a0123241f0d397d39cd18fcc4e5e7edde22730 4 | commit-date: 2016-12-16 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.14.0 7 | LLVM version: 3.9 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.15.0: -------------------------------------------------------------------------------- 1 | rustc 1.15.0 (10893a9a3 2017-01-19) 2 | binary: rustc 3 | commit-hash: 10893a9a349cdd423f2490a6984acb5b3b7c8046 4 | commit-date: 2017-01-19 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.15.0 7 | LLVM version: 3.9 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.16.0: -------------------------------------------------------------------------------- 1 | rustc 1.16.0 (30cf806ef 2017-03-10) 2 | binary: rustc 3 | commit-hash: 30cf806ef8881c41821fbd43e5cf3699c5290c16 4 | commit-date: 2017-03-10 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.16.0 7 | LLVM version: 3.9 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.17.0: -------------------------------------------------------------------------------- 1 | rustc 1.17.0 (56124baa9 2017-04-24) 2 | binary: rustc 3 | commit-hash: 56124baa9e73f28c0709e59e74783cf234a978cf 4 | commit-date: 2017-04-24 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.17.0 7 | LLVM version: 3.9 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.18.0: -------------------------------------------------------------------------------- 1 | rustc 1.18.0 (03fc9d622 2017-06-06) 2 | binary: rustc 3 | commit-hash: 03fc9d622e0ea26a3d37f5ab030737fcca6928b9 4 | commit-date: 2017-06-06 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.18.0 7 | LLVM version: 3.9 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.19.0: -------------------------------------------------------------------------------- 1 | rustc 1.19.0 (0ade33941 2017-07-17) 2 | binary: rustc 3 | commit-hash: 0ade339411587887bf01bcfa2e9ae4414c8900d4 4 | commit-date: 2017-07-17 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.19.0 7 | LLVM version: 4.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.2.0: -------------------------------------------------------------------------------- 1 | rustc 1.2.0 (082e47636 2015-08-03) 2 | binary: rustc 3 | commit-hash: 082e4763615bdbe7b4dd3dfd6fc2210b7773edf5 4 | commit-date: 2015-08-03 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.2.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.20.0: -------------------------------------------------------------------------------- 1 | rustc 1.20.0 (f3d6973f4 2017-08-27) 2 | binary: rustc 3 | commit-hash: f3d6973f41a7d1fb83029c9c0ceaf0f5d4fd7208 4 | commit-date: 2017-08-27 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.20.0 7 | LLVM version: 4.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.21.0: -------------------------------------------------------------------------------- 1 | rustc 1.21.0 (3b72af97e 2017-10-09) 2 | binary: rustc 3 | commit-hash: 3b72af97e42989b2fe104d8edbaee123cdf7c58f 4 | commit-date: 2017-10-09 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.21.0 7 | LLVM version: 4.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.22.0: -------------------------------------------------------------------------------- 1 | rustc 1.22.0 (9c21f8ff4 2017-11-20) 2 | binary: rustc 3 | commit-hash: 9c21f8ff4d80824972910e0c4bbfd1f89620cb0d 4 | commit-date: 2017-11-20 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.22.0 7 | LLVM version: 4.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.23.0: -------------------------------------------------------------------------------- 1 | rustc 1.23.0 (766bd11c8 2018-01-01) 2 | binary: rustc 3 | commit-hash: 766bd11c8a3c019ca53febdcd77b2215379dd67d 4 | commit-date: 2018-01-01 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.23.0 7 | LLVM version: 4.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.24.0: -------------------------------------------------------------------------------- 1 | rustc 1.24.0 (4d90ac38c 2018-02-12) 2 | binary: rustc 3 | commit-hash: 4d90ac38c0b61bb69470b61ea2cccea0df48d9e5 4 | commit-date: 2018-02-12 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.24.0 7 | LLVM version: 4.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.25.0: -------------------------------------------------------------------------------- 1 | rustc 1.25.0 (84203cac6 2018-03-25) 2 | binary: rustc 3 | commit-hash: 84203cac67e65ca8640b8392348411098c856985 4 | commit-date: 2018-03-25 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.25.0 7 | LLVM version: 6.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.26.0: -------------------------------------------------------------------------------- 1 | rustc 1.26.0 (a77568041 2018-05-07) 2 | binary: rustc 3 | commit-hash: a7756804103447ea4e68a71ccf071e7ad8f7a03e 4 | commit-date: 2018-05-07 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.26.0 7 | LLVM version: 6.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.27.0: -------------------------------------------------------------------------------- 1 | rustc 1.27.0 (3eda71b00 2018-06-19) 2 | binary: rustc 3 | commit-hash: 3eda71b00ad48d7bf4eef4c443e7f611fd061418 4 | commit-date: 2018-06-19 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.27.0 7 | LLVM version: 6.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.28.0: -------------------------------------------------------------------------------- 1 | rustc 1.28.0 (9634041f0 2018-07-30) 2 | binary: rustc 3 | commit-hash: 9634041f0e8c0f3191d2867311276f19d0a42564 4 | commit-date: 2018-07-30 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.28.0 7 | LLVM version: 6.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.29.0: -------------------------------------------------------------------------------- 1 | rustc 1.29.0 (aa3ca1994 2018-09-11) 2 | binary: rustc 3 | commit-hash: aa3ca1994904f2e056679fce1f185db8c7ed2703 4 | commit-date: 2018-09-11 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.29.0 7 | LLVM version: 7.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.3.0: -------------------------------------------------------------------------------- 1 | rustc 1.3.0 (9a92aaf19 2015-09-15) 2 | binary: rustc 3 | commit-hash: 9a92aaf19a64603b02b4130fe52958cc12488900 4 | commit-date: 2015-09-15 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.3.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.30.0: -------------------------------------------------------------------------------- 1 | rustc 1.30.0 (da5f414c2 2018-10-24) 2 | binary: rustc 3 | commit-hash: da5f414c2c0bfe5198934493f04c676e2b23ff2e 4 | commit-date: 2018-10-24 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.30.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.31.0: -------------------------------------------------------------------------------- 1 | rustc 1.31.0 (abe02cefd 2018-12-04) 2 | binary: rustc 3 | commit-hash: abe02cefd6cd1916df62ad7dc80161bea50b72e8 4 | commit-date: 2018-12-04 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.31.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.32.0: -------------------------------------------------------------------------------- 1 | rustc 1.32.0 (9fda7c223 2019-01-16) 2 | binary: rustc 3 | commit-hash: 9fda7c2237db910e41d6a712e9a2139b352e558b 4 | commit-date: 2019-01-16 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.32.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.33.0: -------------------------------------------------------------------------------- 1 | rustc 1.33.0 (2aa4c46cf 2019-02-28) 2 | binary: rustc 3 | commit-hash: 2aa4c46cfdd726e97360c2734835aa3515e8c858 4 | commit-date: 2019-02-28 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.33.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.34.0: -------------------------------------------------------------------------------- 1 | rustc 1.34.0 (91856ed52 2019-04-10) 2 | binary: rustc 3 | commit-hash: 91856ed52c58aa5ba66a015354d1cc69e9779bdf 4 | commit-date: 2019-04-10 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.34.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.35.0: -------------------------------------------------------------------------------- 1 | rustc 1.35.0 (3c235d560 2019-05-20) 2 | binary: rustc 3 | commit-hash: 3c235d5600393dfe6c36eeed34042efad8d4f26e 4 | commit-date: 2019-05-20 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.35.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.36.0: -------------------------------------------------------------------------------- 1 | rustc 1.36.0 (a53f9df32 2019-07-03) 2 | binary: rustc 3 | commit-hash: a53f9df32fbb0b5f4382caaad8f1a46f36ea887c 4 | commit-date: 2019-07-03 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.36.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.37.0: -------------------------------------------------------------------------------- 1 | rustc 1.37.0 (eae3437df 2019-08-13) 2 | binary: rustc 3 | commit-hash: eae3437dfe991621e8afdc82734f4a172d7ddf9b 4 | commit-date: 2019-08-13 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.37.0 7 | LLVM version: 8.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.38.0: -------------------------------------------------------------------------------- 1 | rustc 1.38.0 (625451e37 2019-09-23) 2 | binary: rustc 3 | commit-hash: 625451e376bb2e5283fc4741caa0a3e8a2ca4d54 4 | commit-date: 2019-09-23 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.38.0 7 | LLVM version: 9.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.39.0: -------------------------------------------------------------------------------- 1 | rustc 1.39.0 (4560ea788 2019-11-04) 2 | binary: rustc 3 | commit-hash: 4560ea788cb760f0a34127156c78e2552949f734 4 | commit-date: 2019-11-04 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.39.0 7 | LLVM version: 9.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.4.0: -------------------------------------------------------------------------------- 1 | rustc 1.4.0 (8ab8581f6 2015-10-27) 2 | binary: rustc 3 | commit-hash: 8ab8581f6921bc7a8e3fa4defffd2814372dcb15 4 | commit-date: 2015-10-27 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.4.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.40.0: -------------------------------------------------------------------------------- 1 | rustc 1.40.0 (73528e339 2019-12-16) 2 | binary: rustc 3 | commit-hash: 73528e339aae0f17a15ffa49a8ac608f50c6cf14 4 | commit-date: 2019-12-16 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.40.0 7 | LLVM version: 9.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.41.0: -------------------------------------------------------------------------------- 1 | rustc 1.41.0 (5e1a79984 2020-01-27) 2 | binary: rustc 3 | commit-hash: 5e1a799842ba6ed4a57e91f7ab9435947482f7d8 4 | commit-date: 2020-01-27 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.41.0 7 | LLVM version: 9.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.42.0: -------------------------------------------------------------------------------- 1 | rustc 1.42.0 (b8cedc004 2020-03-09) 2 | binary: rustc 3 | commit-hash: b8cedc00407a4c56a3bda1ed605c6fc166655447 4 | commit-date: 2020-03-09 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.42.0 7 | LLVM version: 9.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.43.0: -------------------------------------------------------------------------------- 1 | rustc 1.43.0 (4fb7144ed 2020-04-20) 2 | binary: rustc 3 | commit-hash: 4fb7144ed159f94491249e86d5bbd033b5d60550 4 | commit-date: 2020-04-20 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.43.0 7 | LLVM version: 9.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.44.0: -------------------------------------------------------------------------------- 1 | rustc 1.44.0 (49cae5576 2020-06-01) 2 | binary: rustc 3 | commit-hash: 49cae55760da0a43428eba73abcb659bb70cf2e4 4 | commit-date: 2020-06-01 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.44.0 7 | LLVM version: 9.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.45.0: -------------------------------------------------------------------------------- 1 | rustc 1.45.0 (5c1f21c3b 2020-07-13) 2 | binary: rustc 3 | commit-hash: 5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2 4 | commit-date: 2020-07-13 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.45.0 7 | LLVM version: 10.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.46.0: -------------------------------------------------------------------------------- 1 | rustc 1.46.0 (04488afe3 2020-08-24) 2 | binary: rustc 3 | commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9 4 | commit-date: 2020-08-24 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.46.0 7 | LLVM version: 10.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.47.0: -------------------------------------------------------------------------------- 1 | rustc 1.47.0 (18bf6b4f0 2020-10-07) 2 | binary: rustc 3 | commit-hash: 18bf6b4f01a6feaf7259ba7cdae58031af1b7b39 4 | commit-date: 2020-10-07 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.47.0 7 | LLVM version: 11.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.48.0: -------------------------------------------------------------------------------- 1 | rustc 1.48.0 (7eac88abb 2020-11-16) 2 | binary: rustc 3 | commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4 4 | commit-date: 2020-11-16 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.48.0 7 | LLVM version: 11.0 8 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.49.0: -------------------------------------------------------------------------------- 1 | rustc 1.49.0 (e1884a8e3 2020-12-29) 2 | binary: rustc 3 | commit-hash: e1884a8e3c3e813aada8254edfa120e85bf5ffca 4 | commit-date: 2020-12-29 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.49.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.5.0: -------------------------------------------------------------------------------- 1 | rustc 1.5.0 (3d7cd77e4 2015-12-04) 2 | binary: rustc 3 | commit-hash: 3d7cd77e442ce34eaac8a176ae8be17669498ebc 4 | commit-date: 2015-12-04 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.5.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.50.0: -------------------------------------------------------------------------------- 1 | rustc 1.50.0 (cb75ad5db 2021-02-10) 2 | binary: rustc 3 | commit-hash: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b 4 | commit-date: 2021-02-10 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.50.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.6.0: -------------------------------------------------------------------------------- 1 | rustc 1.6.0 (c30b771ad 2016-01-19) 2 | binary: rustc 3 | commit-hash: c30b771ad9d44ab84f8c88b80c25fcfde2433126 4 | commit-date: 2016-01-19 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.6.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.7.0: -------------------------------------------------------------------------------- 1 | rustc 1.7.0 (a5d1e7a59 2016-02-29) 2 | binary: rustc 3 | commit-hash: a5d1e7a59a2a3413c377b003075349f854304b5e 4 | commit-date: 2016-02-29 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.7.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.8.0: -------------------------------------------------------------------------------- 1 | rustc 1.8.0 (db2939409 2016-04-11) 2 | binary: rustc 3 | commit-hash: db2939409db26ab4904372c82492cd3488e4c44e 4 | commit-date: 2016-04-11 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.8.0 7 | -------------------------------------------------------------------------------- /static/stable/verbose/rustc-1.9.0: -------------------------------------------------------------------------------- 1 | rustc 1.9.0 (e4e8b6668 2016-05-18) 2 | binary: rustc 3 | commit-hash: e4e8b666850a763fdf1c3c2c142856ab51e32779 4 | commit-date: 2016-05-18 5 | host: x86_64-unknown-linux-gnu 6 | release: 1.9.0 7 | --------------------------------------------------------------------------------