chore(build): pin rustc 1.98.1, rust-lld, and the README's toolchain claim

The compiler moves into rust-toolchain.toml so the repository, rustup and both
workflows read one file; the MSVC linker is replaced by the rust-lld that ships
inside every toolchain, which halves the fat-LTO relink (112 s -> 56 s per
edit->build cycle). The README named 1.80+ for a tree that needs 1.98.
This commit is contained in:
Kirill Minovsky 2026-09-24 12:22:33 +03:00
parent 48a1abe225
commit 181634bc39
3 changed files with 24 additions and 4 deletions

View file

@ -12,3 +12,20 @@ linker = "rust-lld"
# artifact still starts (`--version` and `--legend` both exit 0 on the runner).
[target.x86_64-win7-windows-msvc]
linker = "rust-lld"
# Rejected here, with the reason, so nobody re-tries them:
#
# embed-metadata = false Cargo 1.98.1 reports the key as unused — `cargo
# metadata` prints "unused config key" on every
# invocation, and it is part of the CI cache key, so a
# stray key would bust the runners' caches for nothing.
# The real lever is the nightly-only
# `-Z no-embed-metadata` (cargo 1.98.1 lists it, but
# stable rejects every `-Z` and neither installed
# nightly knows the rustc option). Measured for scale:
# a clean dev build is 1078 MiB, of which 434 MiB is
# `.rlib` and 165 MiB `.rmeta` — the win would be a
# fraction of that, and it cannot ship on the pinned
# toolchain.
# sccache, mold no benefit at one codegen unit with fat LTO, and
# mold is ELF-only while these rows link with rust-lld.

View file

@ -298,7 +298,9 @@ NFQWS_EXTRA_ARGS="$MODE_ALL"
## 🏗️ Сборка из исходников
Для самостоятельной сборки потребуется установленный Rust (версии 1.80+):
Для самостоятельной сборки нужен Rust: версия закреплена в `rust-toolchain.toml`
(сейчас 1.98.1), и `rustup` поставит её сам при первой сборке — ничего выбирать не надо.
Если `rustup` не используется, компилятор должен быть не старее версии из этого файла.
```bash
git clone https://github.com/Runnin4ik/dpi-detector.git -b rust

View file

@ -4,9 +4,10 @@
# "stable" meant on the day a runner picked it up.
#
# `profile` and `components` are exactly what CI needs: clippy is a required
# check (AGENTS.md §4). rustfmt is deliberately not here — the sources are
# formatted by hand (§3.7) — and rust-analyzer, rust-docs and the extra targets
# are a contributor's own business (`rustup component add`).
# check (AGENTS.md, "Testing & QA"). rustfmt is deliberately not here — the
# sources are formatted by hand (AGENTS.md, "Development Commands") — and
# rust-analyzer, rust-docs and the extra targets are a contributor's own
# business (`rustup component add`).
#
# Three rows of the release matrix cannot use this pin and name their toolchain
# on the command line instead: win7 and the two MIPS targets build std from