Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Prerequisites

The Rust toolchain version is pinned in [`src/rust-toolchain.toml`](../src/rust-toolchain.toml) to match what CI uses (currently 1.93). The pin is honored automatically by `rustup` — running any `cargo` command from `src/` (or below) downloads and selects that channel on first use. To opt out for one-off testing on a different toolchain, use `cargo +<channel> ...` or set `RUSTUP_TOOLCHAIN`. When bumping the pinned version, bump the matching `version: 'ms-prod-1.<N>'` lines in the two `.azure-pipelines/templates/*.Build.Job.yml` files in the same commit.

LSP servers are configured in `.github/lsp.json` for Rust and TypeScript. Install them before use:

```
Expand Down
29 changes: 29 additions & 0 deletions src/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Pin the Rust toolchain used for local development to match CI.
#
# CI uses `ms-prod-1.93` (Microsoft's internal Rust 1.93 distribution
# from the Mxc-Azure-Feed) — see
# `.azure-pipelines/templates/Rust.Build.Job.yml` and
# `.azure-pipelines/templates/Mac.Build.Job.yml`. Public rustup users
# get the equivalent open-source channel `1.93` here.
#
# Why pin: clippy lints can appear, be downgraded, be reworded, or
# change defaults between Rust releases. Without this pin, a developer
# on a newer rustup toolchain can pass local
# `cargo clippy --all-targets --all-features --release -- -D warnings`
# and still hit failures in CI on lints introduced in (or differently
# defaulted by) the older toolchain. Pinning eliminates that skew
# entirely.
#
# Bumping: bump the `version: 'ms-prod-1.<N>'` lines in the two
# `.azure-pipelines/templates/*.Build.Job.yml` files and `channel`
# here in the same commit. Then run the standard pre-push ladder
# (see `.github/copilot-instructions.md` § Verification) against the
# new toolchain.
#
# Opt-out: `cargo +<channel> ...` or `RUSTUP_TOOLCHAIN=<channel> ...`
# for one-off testing on a different toolchain.

[toolchain]
channel = "1.93"
components = ["clippy", "rustfmt"]
profile = "minimal"
Loading