SuperAPI AI Directory

modern-rust

Coding & development

View repository

Updated 10-16 04:34

About this skill

Modern Rust

Anchor Rust work in the repository's compatibility contract, not the model's training cutoff.

Orient

  1. Inspect workspace and package rust-version, edition, and resolver settings in Cargo.toml; rust-toolchain or rust-toolchain.toml; and CI, container, and release toolchain pins when relevant.

  2. Keep these signals distinct:

    Signal Meaning
    edition Per-crate language semantics; not an MSRV declaration
    rust-version Minimum supported Rust compiler and Cargo
    Toolchain pin Compiler selected for builds; not permission to raise MSRV
  1. Use syntax, standard-library APIs, Cargo features, and lints available at the declared MSRV and edition. If the MSRV is unstated, infer it conservatively from project policy and CI rather than raising it silently.
  2. Read every release crossed by a toolchain or MSRV upgrade and any release whose feature affects the task. For an edition migration, run cargo fix --edition before changing edition, audit its safety-related edits, and test the supported toolchain range.
  3. Use the latest patch in a selected 1.N family. Point releases can fix miscompilations, security issues, and regressions without adding features.

Release Index

Read a file when its feature affects the task or an upgrade crosses it.

  • 2023: 1.72 const evaluation and doctest paths · 1.73 reference-cast lints and panic output · 1.74 Cargo lints and registry authentication · 1.75 async and opaque returns in traits.
  • 2024: 1.76 pointer identity · 1.77 C literals, recursive async, and offset_of! · 1.78 diagnostics and unsafe checks · 1.79 inline const and associated bounds · 1.80 lazy cells and cfg checking · 1.81 core errors and expected lints · 1.82 precise captures and raw references · 1.83 const evaluation and macro fragments.
  • 2025: 1.84 provenance and MSRV-aware resolution · 1.85 Rust 2024 and async closures · 1.86 trait upcasting and disjoint mutation · 1.87 trait captures and pipes · 1.88 let-chains and cache collection · 1.89 const inference and the Wasm C ABI · 1.90 rust-lld and workspace publishing · 1.91 C variadics and strict arithmetic · 1.92 never fallback and zeroed allocation.
  • 2026: 1.93 musl and conditional assembly · 1.94 array_windows and Cargo config inclusion · 1.95 if let guards and cfg_select! · 1.96 core ranges and stricter Wasm linking · 1.97 v0 mangling and Cargo warning controls.

Rust remains on SemVer major 1; this skill treats each stable 1.N feature release as a version. Coverage starts at Rust 1.72 and ends at 1.97. For a newer or uncertain toolchain, check the current official release announcements before making version-sensitive decisions. Use these files for orientation, then verify exact APIs and behavior in the official documentation for the relevant toolchain.