Files
archy/core/target/debug/deps/libversion_check-a38ac275d10c0882.rmeta
T

140 lines
71 KiB
Plaintext
Raw Normal View History

2026-01-24 22:59:20 +00:00
rust
Ã#rustc 1.93.0 (254b59607 2026-01-19)Áõ…·fÊ ¦%g--c48c539199cbc88bÁ³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Áá\ƒ¦è3$|]åŒ[IÚ tæ-14b12edc9f8cd90bÁë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Áà 9m Ù„«ÐÒþá•cB;-030c5b0bba47cc8fÁrustc_std_workspace_coreÁÛ¹þÓ7>H%¸ÚÉ­-4b81d37a5530864dÁüÃùs<Uß7VyóHr#QÏ-c66cc7807550ce25Á miniz_oxideÁõFÖˆÚ™ª‹"ÞXzLVª-62cbc7af83058505Áadler2Á—wÉD‘嵯|6¨%Œ
+-2f171dd2394b4b62Á hashbrownÁ,ïcV¼¨ø¢:Ê\'È߈-9571ba9e0f6c7a90Árustc_std_workspace_allocÁ%¥Èxµù·¼5Ä3Bœ-aac566ad65903fa4Á
std_detectÁMmáýZ^9õ Îà§e˜÷e-2edb296e590136d8Árustc_demangleÁ@¼§VÉNb˜æ¨fHÌ+V3-53b132e4a2fa6e26Ácfg_ifÁfÝv.Å"ÒÜuPp¹ˆ¶-f76b385d7d4d7f3eÁ addr2lineÁÕú-WiúQVÓ¬
µT§5-fe25100bd73e48e4ÁgimliÁ¹xLáÇí÷‘o±Ñ8£Å-265ba9e6e4f70b3fÁobjectÁÔ³ÝzÓÿ¶ò°öM›¼òü`-9ae0d1f8ea52a318ÁmemchrÁRÎ÷׎™te~QÓ¿ØC\Ò-0bff3c8e8f4e489eÁ  –©HtGNÏ·ˆ!á-d69228d077d46f36ÁtestsÁ,¶3à$«3'Å,×,à$Ì,Å,ùià$îiªreadÁ  parseÁ  from_mmpÁto_mmpÁat_leastÁ at_mostÁ exactlyÁ ÍÍchannelÁ¨  »supports_featuresÁis_devÁ
is_nightlyÁis_betaÁ is_stableÁ%ÍdateÁ'')¨* * )»- - )from_ymdÁ)to_ymdÁ)ë2 )þ4 ) 6 '8Í#version_and_date_from_rustc_versionÁ? ? ? ? +version_and_date_from_rustc_verbose_versionÁD E get_version_and_dateÁG G G tripleÁ is_min_dateÁ is_max_dateÁ
is_exact_dateÁis_min_versionÁis_max_versionÁis_exact_versionÁis_feature_flaggableÁR supports_featureÁT T V TALLOW_FEATURESÁT T T T VersionÁ]
]ìaÕc˜gÈ i¤ 
kÐKindÁmDevÁn
mNightlyÁp
mBetaÁr
mStableÁt
vÍyÕ{˜ÈChannelÁ
ì Í
 Õ ˜
È'DateÁ
ì'Í''Õ'˜'''È' ¤ '
ŸÐ
















!
"
#
$
&
&
&
-
1
2
2
4
4
6
6
9
9
9
?
D
D
L
M
N
O
P
Q
T
b
b
d
h
j
j
l
l
w
w
w
z
z
|




ˆ
ˆ
Š
Ž





˜
œ
ž
ž
 
 
¬â]]^ß_ì D.Úˆ»C˜¿žÎΣÎþÎáÎÞÎÉÎÎÃÎå`Îà`Îà`mnoÆpqÔrsætuõý\Åú66AW¬âážáá£áþáááÞáà`¾ƒì JçoWã[¬âôžôô£ôþôáôÞôå`ôà`ì' M_æ.c~xf¬âõžõõ£õþõáõÞõÉõõÃõå`õ`]xm†a]ym‡c]{m‰e]}mf]~šg]mi]k]%8]vm„¬âÑž£þáÞÉà å` à`œŸ#dbH[ ÎâŸgŸn4î AKhdfâ#-(puh$Î0â7@JœŸŸ',
ËŸŸ@EMjPwø°ú°û°Ðü°ý°þ°ìHˈXêE>üÕýÕþÕLessÁÿÕ€ÖÖ‚ÖƒÖ„ÖGreaterÁ…ÖiÒ6’<˱â¸â¿ Ÿ,ø 4Ûî èòƒ^ œŸŸ',
ÄŸ=BJl ƒƒ ââø ƒø Š3î @Jí!³( %+3 JRÈ#emÈ#8ˆÈ#S¢
‹a³¸ÀwÕê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ÍѼѼÒ¼ štÀ.V áa Á`Á`œÃ`è Á]Ä`bufÁÁ]Ê­\É:•§È#¯·ÁþÏÚ¶$äH 
 (z8=CNé%Ué%\Â&cÂ&jsî  __self_discrÁ __arg1_discrÁ°¸,|*Í
é%'(49 á+é%2;E(¼ È# óá  à`QV
¨agl\yÁë$ ô¥ô%¬È#³¢*¥ é%¯é%Ôþáëž+¢*á¼*û óáá',
 áá@EM̈HÃ
ÿ*ÿ*é%é%2î ?I—,ЊÎÍÿ*$.(ØÝŽ"'ô3ÿ*:CM( È#Å ¢*GL¼*X]Mjë$Œ õô%È#¤¢*  ù.£„0ªÈþÕß‚0¢*Õ¼*ïÅù.ù.#H
ã/ã/ù.gù.n2î ?I˜Íã/$.(œ¡œ"'õ3ã/
]^#Î.Ÿ5<J
]_^kÎvŸ}”à
%ô0á7>L
boôzáˆ
%õ0ù.7>L
boõzù.ˆ'?DGKLMNOPQRTÒµ"Û:Ò:y<Ì"Ð.;ß<”]<¾=¢¢üKH This tiny crate checks that the running or installed `rustc` meets someÁüLMJ version requirements. The version is queried by calling the Rust compilerÁüšJG with `--version`. The path to the compiler is determined first via theÁüåLI `RUSTC` environment variable. If it is not set, then `rustc` is used. IfÁü²B? that fails, no determination is made, and calls return `None`.ÁõË # ExamplesÁˆËüŒLI **Note:** Please see [feature detection] for a note on enabling unstableÁüÙ/, features based on detection via this crate.ÁËü0- [feature detection]: crate#feature-detectionÁ¾ËüÂNK * Set a `cfg` flag in `build.rs` if the running compiler was determined toÁü‘# be at least version `1.13.0`:ÁµË
```rustÁüÇ*' extern crate version_check as rustc;ÁòËüö;8 if rustc::is_min_version("1.13.0").unwrap_or(false) {Áü²=: println!("cargo:rustc-cfg=question_mark_operator");Á ```ÁËü†MJ See [`is_max_version`] or [`is_exact_version`] to check if the compilerÁüÔ2/ is _at most_ or _exactly_ a certain version.Á”‡ <br /><br />ÁšËüžLI * Check that the running compiler was released on or after `2018-12-18`:ÁëËÊ@üý*à@¨ Ëü¬ .+ match rustc::is_min_date("2018-12-18") {ÁüÛ ,) Some(true) => "Yep! It's recent!",Áüˆ
+( Some(false) => "No, it's older.",Áü´
96 None => "Couldn't determine the rustc version."Á
 };Á
¶B Ëü… KH See [`is_max_date`] or [`is_exact_date`] to check if the compiler wasÁüÑ 96 released _prior to_ or _exactly on_ a certain date.Á”‹ ãCž Ëü¢ =: * Check that the running compiler supports feature flags:Áà Ë Ê@üò *à@
Ëü¡
+( match rustc::is_feature_flaggable() {ÁüÍ
>; Some(true) => "Yes! It's a dev or nightly release!",ÁüŒ41 Some(false) => "No, it's stable or beta.",ÁüÁ9«FìFL„¶BŽËü’1. Please see the note on [feature detection].Á”ÄãC×ËüÛB? * Check that the running compiler supports a specific feature:ÁžËÊ@ü°*à@ÛËüß>; if let Some(true) = rustc::supports_feature("doc_cfg") {Áüž1. println!("cargo:rustc-cfg=has_doc_cfg");Á§B¶BâËüæ1—K”˜ãC«Ëü¯?< * Check that the running compiler is on the stable channel:ÁïËÊ@ü*à@¬Ëü°$! match rustc::Channel::read() {ÁüÕC@ Some(c) if c.is_stable() => format!("Yes! It's stable."),Áü™EB Some(c) => format!("No, the channel {} is not stable.", c),ÁüßB? None => format!("Couldn't determine the rustc version.")ÁìF¶BµËü¹OL To interact with the version, release date, and release channel as structs,Áü‰NK use [`Version`], [`Date`], and [`Channel`], respectively. The [`triple()`]ÁüØ2/ function returns all three values efficiently.Á˼ # Feature DetectionÁ§Ëü«NK While this crate can be used to determine if the current compiler supportsÁüúNK an unstable feature, no crate can determine whether that feature will workÁüÉGD in a way that you expect ad infinitum. If the feature changes in anÁü‘GD incompatible way, then your crate, as well as all of its transitiveÁüÙPM dependents, will fail to build. As a result, great care should be taken whenÁüªJG enabling nightly features even when they're supported by the compiler.ÁõËüùMJ One common mitigation used in practice is to make using unstable featuresÁüÇOL transitively opt-in via a crate feature or `cfg` so that broken builds onlyÁü—MJ affect those that explicitly asked for the feature. Another complementaryÁüåNK approach is to probe `rustc` at build-time by asking it to compile a smallÁü´PM but exemplary program that determines whether the feature works as expected,Áü…MJ enabling the feature only if the probe succeeds. Finally, eschewing theseÁüÓOL recommendations, you should track the `nightly` channel closely to minimizeÁü£,) the total impact of a nightly breakages.ÁÐË”Ô # AlternativesÁçËüëNK This crate is dead simple with no dependencies. If you need something moreÁüº OL and don't care about panicking if the version cannot be obtained, or if youÁüŠ!'$ don't mind adding dependencies, seeÁü²!<9 [rustc_version](https://crates.io/crates/rustc_version).Á'?DGKLMNOPQRTPÒRÛ:Òd:yRÐ.;ßQ]<¾P=O>\‡"<"]^Í ï+DÎ
üÍ ü¶IF Reads the version of the running compiler. If it cannot be determinedÁü„?< (see the [top-level documentation](crate)), returns `None`.ÁÈË
# ExampleÁâË ```rustÁüú use version_check::Version;ÁžËܦ match Version::read() {ÁüÆ0- Some(d) => format!("Version is: {}", d),Áüû63 None => format!("Failed to read the version.")Á };Á ```Á$Ôø°ú°û°Ðü°ý°þ°ìHˈXêE>Î
<closure_kind>Á<closure_signature>Á<upvars>Áø°ú°û°Ðü°ý°þ°ìHˈXêE>ÉHÉHÊHœÜ3ËÚ¢×€JÜ×g×gÍøef­fÍg›hƒfÍüÛ.ü…-* Parse a Rust release version (of the formÁü·HE `major[.minor[.patch[-channel]]]`), ignoring the release channel, ifÁü„HE any. Returns `None` if `version` is not a valid Rust version string.ÁÑËÕbëËõbüƒ‰c§Ëü¯41 let version = Version::parse("1.18.0").unwrap();Áüè'$ assert!(version.exactly("1.18.0"));ÁËüœ <9 let version = Version::parse("1.20.0-nightly").unwrap();ÁüÝ '$ assert!(version.exactly("1.20.0"));Áü‰
,) assert!(version.exactly("1.20.0-beta"));Áº
ËüÂ
1. let version = Version::parse("1.3").unwrap();Áüø
&# assert!(version.exactly("1.3.0"));Á£ Ëü« /, let version = Version::parse("1").unwrap();Áüß &# assert!(version.exactly("1.0.0"));ÁŠ Ëü’ 74 assert!(Version::parse("one.two.three").is_none());ÁüÎ 30 assert!(Version::parse("1.65536.2").is_none());Áü†
.+ assert!(Version::parse("1. 2").is_none());Áü¹
*' assert!(Version::parse("").is_none());Áüè
,) assert!(Version::parse("1.").is_none());Áü™1. assert!(Version::parse("1.2.3.4").is_none());Áäd,â¡ ¡ƒf ñ
ªŒ øe
f
­f

 
È#ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶ŒŒ
ParseIntErrorÁ¯ ¼Ë¼D|9AÍ Á  ƒ#ü¹>ü‚HE Creates a `Version` from `(major, minor, patch)` version components.ÁÏËÕbéËõbü‰c¥Ëü­;8 assert!(Version::from_mmp(1, 35, 0).exactly("1.35.0"));Áüí;8 assert!(Version::from_mmp(1, 33, 0).exactly("1.33.0"));Áü­;8 assert!(Version::from_mmp(1, 35, 1).exactly("1.35.1"));Áüí;8 assert!(Version::from_mmp(1, 13, 2).exactly("1.13.2"));Á<­ädDÀ¨t¨t¨tÎ
majorÁ,ÉminorÁ,ÕpatchÁ,áü¹'üÕEB Returns the `(major, minor, patch)` version components of `self`.ÁŸËÕb¹ËõbüщcõËüýGD assert_eq!(Version::parse("1.35.0").unwrap().to_mmp(), (1, 35, 0));ÁüÉGD assert_eq!(Version::parse("1.33.0").unwrap().to_mmp(), (1, 33, 0));Áü•GD assert_eq!(Version::parse("1.35.1").unwrap().to_mmp(), (1, 35, 1));ÁüáGD assert_eq!(Version::parse("1.13.2").unwrap().to_mmp(), (1, 13, 2));Á<­äd4À¢ ¢Î¨t¨t¨t Ç
ü…#-üC@ Returns `true` if `self` is greater than or equal to `version`.ÁÉËüÑLI If `version` is greater than `self`, or if `version` is not a valid RustÁü¢$! version string, returns `false`.ÁËËÕbåËõbüý‰c¡Ëü©41 let version = Version::parse("1.35.0").unwrap();ÁâËüê(% assert!(version.at_least("1.33.0"));Áü— (% assert!(version.at_least("1.35.0"));ÁüÄ (% assert!(version.at_least("1.13.2"));Áñ Ëüù )& assert!(!version.at_least("1.35.1"));Áü§!)& assert!(!version.at_least("1.55.0"));ÁÕ!ËüÝ!41 let version = Version::parse("1.12.5").unwrap();Á"Ëüž"(% assert!(version.at_least("1.12.0"));ÁüË")& assert!(!version.at_least("1.35.0"));Á<ù"ädDŒ#£¤ £Î ¤ •#