rust-nightly

Guides Rust nightly workflows covering feature gates, unstable APIs, and target platforms.

2|Updated May 16, 2026
One-click install
npx skills add https://github.com/avbel/ai-skills --skill rust-nightly-avbel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-nightly
Source: https://github.com/avbel/ai-skills/tree/main/skills/rust-nightly
Command: npx skills add https://github.com/avbel/ai-skills --skill rust-nightly-avbel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Rust nightly features change constantly and lack semver guarantees, making it risky to adopt feature gates, unstable std APIs, or -Z flags without knowing their current status, tracking issues, and stabilization paths. ## Core Features & Use Cases - Feature Gate Reference: Maps unstable language features (f16/f128, coroutines, generic_const_exprs, never_type) and library features (portable_simd, async_iterator, allocator_api) to their gates, use cases, and risk notes. - Toolchain & CI Guidance: Provides dated nightly pinning via rust-toolchain.toml, -Z allow-features containment, and commands for fmt, clippy, test, and Miri. - Platform & Obsolescence Data: Lists Tier 1/2/3 target support and flags superseded items like box_patterns, try!, and extern crate test with their replacements. - Use Case: When a crate needs portable SIMD or build-std for a custom target, consult this skill to pick the right gates, pin a nightly date, and set up CI that prevents accidental nightly feature creep. ## Quick Start Ask the agent to set up a pinned nightly toolchain with portable_simd and configure CI to restrict allowed feature gates for your Rust project.

Frequently Asked Questions about rust-nightly

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pin a specific Rust nightly version for my project?▼

Create a rust-toolchain.toml file with channel set to a dated nightly like nightly-2026-06-13, plus a minimal profile and needed components such as rustfmt, clippy, rust-src, and miri. This ensures reproducible builds across CI and developer machines.

How do I restrict which nightly features my crate can use in CI?▼

Pass -Zallow-features=f16,portable_simd via RUSTFLAGS when running cargo check on nightly. This causes compilation to fail if any dependency or code introduces a feature gate outside the approved list.

Should I use RUSTC_BOOTSTRAP to enable nightly features on stable Rust?▼

No. RUSTC_BOOTSTRAP exists for compiler bootstrapping, not application builds, and bypasses stability guarantees silently. Use an actual nightly toolchain with +nightly or a pinned rust-toolchain.toml instead.

What replaced box_patterns and extern crate test in Rust nightly?▼

box_patterns is superseded by deref_patterns for smart-pointer pattern matching. The unstable extern crate test and #[bench] API should be replaced with stable benchmarking crates like divan or Criterion.

Does Rust nightly support custom or bare-metal targets?▼

Yes, Tier 2 and Tier 3 targets cover bare-metal ARM, RISC-V, WebAssembly, UEFI, and more. For targets without prebuilt std, use a custom target JSON specification combined with -Z build-std and document linker and panic settings in .cargo/config.toml.

What are the risks of using generic_const_exprs in production code?▼

generic_const_exprs is marked incomplete, meaning it has known soundness and diagnostics issues. Expect syntax churn and compiler errors; gate it explicitly, link the tracking issue, and keep a fallback plan for stabilization or removal.