- Rust 1.96.0 को
rustup update stable से इंस्टॉल किया जा सकता है, और आने वाले releases के verification में beta/nightly चैनल पर भाग लिया जा सकता है
- नए
core::range::Range* types Iterator की जगह IntoIterator implement करते हैं, इसलिए Copy implementation संभव है, और आगे चलकर यही range syntax के default type बनेंगे
- assert_matches! और
debug_assert_matches! pattern mismatch होने पर value का Debug representation भी दिखाते हैं, जिससे test failure का diagnosis आसान होता है
- WebAssembly targets अब default रूप से
--allow-undefined pass नहीं करते, इसलिए undefined symbols अब import बनने के बजाय linker error बनते हैं
- Cargo में third-party registry users के लिए CVE-2026-5223 और
CVE-2026-5222 fixes शामिल हैं, जबकि crates.io users प्रभावित नहीं होते
Rust 1.96.0 के मुख्य बदलाव
-
अपडेट और टेस्ट चैनल
- जिन users ने मौजूदा Rust को
rustup से इंस्टॉल किया है, वे rustup update stable से Rust 1.96.0 प्राप्त कर सकते हैं
- अगर
rustup नहीं है, तो Rust वेबसाइट के rustup install page से इसे इंस्टॉल किया जा सकता है, और 1.96.0 की detailed release notes भी उपलब्ध हैं
- आने वाले releases के verification में भाग लेने के लिए
rustup default beta या rustup default nightly के जरिए beta/nightly channels का उपयोग किया जा सकता है, और bugs को Rust issue tracker में report किया जा सकता है
-
नए Range* types
-
pattern matching assertion macros
-
WebAssembly target में बदलाव
- WebAssembly targets अब linker को
--allow-undefined pass नहीं करते
- link के समय undefined symbols अब
"env" module के WebAssembly import में convert नहीं होते, बल्कि linker error बनते हैं
- अगर link से जुड़े symbols सभी define नहीं हैं, तो module link नहीं होगा, जिससे bugs जल्दी पकड़े जा सकते हैं और symbol names जैसी चीजों से होने वाली आकस्मिक समस्याएं रोकी जा सकती हैं
- undefined link-related symbols आमतौर पर build-time bug या configuration error को दर्शाते हैं
- अगर पुराना behavior जानबूझकर उपयोग किया जा रहा था, तो
RUSTFLAGS=-Clink-arg=--allow-undefined से उसे वापस लाया जा सकता है, या source code में symbol define करने वाले block पर #[link(wasm_import_module = "env")] इस्तेमाल किया जा सकता है
- यह बदलाव पिछली blog announcement के बाद Rust 1.96 में लागू किया गया
stabilize किए गए API और security fixes
-
stabilize किए गए API
-
Cargo के लिए 2 security advisories
- Rust 1.96 में third-party registry users के लिए Cargo की 2 vulnerabilities के fixes शामिल हैं
- CVE-2026-5223 symbolic link वाले crate tarball extraction से जुड़ी मध्यम गंभीरता की vulnerability है
- CVE-2026-5222 normalized URL के जरिए authentication से जुड़ी कम गंभीरता की vulnerability है
- crates.io users इन दोनों vulnerabilities से प्रभावित नहीं होते
-
अतिरिक्त बदलाव
1 टिप्पणियां
Lobste.rs की राय
assert_matchesको बार-बार चाहने लगता हूँ, लेकिन हर बार यह सोचना पड़ता है कि नया crate जोड़ूँ या इसे खुद फिर से implement करूँइसलिए इसका standard library में आना स्वागतयोग्य है
ranges को
Copytype बनाने की दिशा मुझे पसंद आईकभी-कभी range को clone करना पड़ता है, यह देखकर मैं चौंका हूँ, और यह उस intuition से भी बेहतर मेल खाता है कि
12..34छोटा और copyable data होना चाहिएहालाँकि, अगर एक ही नाम वाले कई types हो गए, तो थोड़ी चिंता है कि अगली बार VS Code
usedeclaration अपने-आप जोड़ते समय कहीं गलत type न import कर देज़्यादातर users के लिए नए types का फ़ायदा छोटा है, इसलिए वे बस मौजूदा types का इस्तेमाल जारी रख सकते हैं, और अगली edition boundary पर नए types अपने-आप इस्तेमाल होने लगेंगे
लगता है कि types को import मुख्य रूप से वे library authors करेंगे जो दोनों versions को explicitly support करना चाहते हैं
prelude को बदला जा सकता है बिना मौजूदा projects को तोड़े