{"id":7427,"date":"2026-04-18T21:31:23","date_gmt":"2026-04-18T19:31:23","guid":{"rendered":"https:\/\/yoota.it\/en\/rust-1-95-ships-with-built-in-platform-selection-and-enhanced-match-syntax\/"},"modified":"2026-04-18T21:31:24","modified_gmt":"2026-04-18T19:31:24","slug":"rust-1-95-ships-with-built-in-platform-selection-and-enhanced-match-syntax","status":"publish","type":"post","link":"https:\/\/yoota.it\/en\/rust-1-95-ships-with-built-in-platform-selection-and-enhanced-match-syntax\/","title":{"rendered":"Rust 1.95 Ships with Built-in Platform Selection and Enhanced Match Syntax"},"content":{"rendered":"\n<p>Rust 1.95.0 arrived yesterday via <code>rustup update stable<\/code>. Two features stand out for everyday Rust development, plus one change worth noting if you work on non-standard platforms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Fewer External Dependencies for Platform-Specific Code<\/h2>\n\n\n\n<p>The new <code>cfg_select!<\/code> macro lets you choose different code blocks based on target platform or compilation flags, using syntax similar to a regular <code>match<\/code> statement. Until now, the go-to solution was the <code>cfg-if<\/code> crate, widely used across projects. With Rust 1.95, this functionality moves into the standard library, eliminating the external dependency.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">If-Let Guards in Match Expressions<\/h2>\n\n\n\n<p>Rust 1.88 introduced <em>let chains<\/em>, allowing you to chain multiple <code>let<\/code> conditions in a single <code>if<\/code> or <code>while<\/code> expression. Rust 1.95 extends this to match statements: you can now add an <code>if let<\/code> condition directly on a match arm, combining pattern matching and a secondary value check in one go. For anyone working with complex data structures or optional results, this means cleaner code without splitting logic across multiple steps.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Note for Embedded Developers<\/h2>\n\n\n\n<p>Rust 1.95 removes support for JSON-based custom target specifications from the stable release. These are mainly used in embedded development for unofficially supported platforms. As the Rust team explains, this feature already required the nightly channel, so stable-only users shouldn&#8217;t notice anything. The team opened an issue to gather real-world use cases before deciding whether and how to stabilize something down the road.<\/p>\n\n\n\n    \n    <div class=\"yoota-fonte\">\n        <a href=\"https:\/\/blog.rust-lang.org\/2026\/04\/16\/Rust-1.95.0\/\" target=\"_blank\" rel=\"nofollow noopener\" class=\"yoota-fonte-hit\">\n            \n            <span class=\"yoota-fonte-icon\" aria-hidden=\"true\">\n                <i class=\"ri-external-link-line\"><\/i>\n            <\/span>\n\n            <span class=\"yoota-fonte-content\">\n                <span class=\"yoota-fonte-label\">SOURCE:\/\/<\/span>\n\n                                    <span class=\"yoota-fonte-link\">\n                        blog.rust-lang.org                    <\/span>\n                            <\/span>\n\n        <\/a>\n    <\/div>\n    \n    \n\n\n\n    \n    <div class=\"yoota-fonte\">\n        <a href=\"https:\/\/www.phoronix.com\/news\/Rust-1.95-Released\" target=\"_blank\" rel=\"nofollow noopener\" class=\"yoota-fonte-hit\">\n            \n            <span class=\"yoota-fonte-icon\" aria-hidden=\"true\">\n                <i class=\"ri-external-link-line\"><\/i>\n            <\/span>\n\n            <span class=\"yoota-fonte-content\">\n                <span class=\"yoota-fonte-label\">SOURCE:\/\/<\/span>\n\n                                    <span class=\"yoota-fonte-link\">\n                        phoronix.com                    <\/span>\n                            <\/span>\n\n        <\/a>\n    <\/div>\n    \n    \n","protected":false},"excerpt":{"rendered":"<p>Rust 1.95.0 ships with cfg_select!, a built-in macro that eliminates the need for a widely-used external crate, while match expressions gain more flexibility through if-let guard support.<\/p>\n","protected":false},"author":2,"featured_media":7426,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"italian_url":"https:\/\/yoota.it\/rust-1-95-riduce-le-dipendenze-esterne-e-migliora-la-sintassi-dei-match\/","yoota_meta_description":"","activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[51],"tags":[107,622,348],"class_list":["post-7427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev","tag-open-source","tag-programming","tag-rust"],"_links":{"self":[{"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/posts\/7427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/comments?post=7427"}],"version-history":[{"count":1,"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/posts\/7427\/revisions"}],"predecessor-version":[{"id":7429,"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/posts\/7427\/revisions\/7429"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/media\/7426"}],"wp:attachment":[{"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/media?parent=7427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/categories?post=7427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yoota.it\/en\/wp-json\/wp\/v2\/tags?post=7427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}