Skip to content

fix(lint): pin Rust toolchain so soldr builds fastled-lint via rustup - #3729

Merged
zackees merged 1 commit into
masterfrom
fix/soldr-rust-toolchain-pin
Jul 27, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/soldr-rust-toolchain-pin

Conversation

@zackees

@zackees zackees commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Summary

bash lint was hard-failing on hosts where a non-rustup Rust shadows rustup on PATH: the fastled-lint build (via soldr) died on every crate with error[E0463]: can't find crate for std``.

Root cause: with no rust-toolchain.toml in the repo, soldr resolves rustc from PATH. On this bench host that's chocolatey's rustc.exe — an x86_64-pc-windows-gnu-host build whose sysroot contains only the gnu std. soldr canonicalizes the build target to x86_64-pc-windows-msvc, so every compile requests an msvc std that doesn't exist.

Fix: pin the toolchain at the repo root. With the pin present, soldr (and rustup-proxied cargo) resolve through rustup — verified with cargo build -v: rustc switches from C:\ProgramData\chocolatey\bin\rustc.exe to soldr's managed rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe and the build succeeds. Only ci/lint_cpp_rs is affected (sole crate in the repo).

Second commit: repairing the linter surfaced a previously-invisible BannedMacrosChecker violation in examples/hydropack/hydropack.ino (raw static_assert from #3712, which merged while the Rust linter couldn't build). Swapped to FL_STATIC_ASSERT + its include.

Testing

  • soldr --no-cache cargo build --bin fastled-lint — was E0463 on all crates, now succeeds
  • bash lint --cpp — fully green (previously ❌ cpp_linting FAILED)
  • bash compile wasm --examples hydropack — builds successfully

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved Rust toolchain consistency for linting and build checks.
    • Prevented host-environment configuration issues that could cause standard library resolution failures.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e16ba0c-7bbe-4039-8df4-9d7173b9deb9

📥 Commits

Reviewing files that changed from the base of the PR and between d098463 and a45214e.

📒 Files selected for processing (1)
  • rust-toolchain.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • rust-toolchain.toml

📝 Walkthrough

Walkthrough

Adds rust-toolchain.toml to pin Rust builds used by ci/lint_cpp_rs to the stable channel and document rustup-based toolchain resolution.

Changes

Rust toolchain configuration

Layer / File(s) Summary
Stable Rust toolchain pin
rust-toolchain.toml
Configures the Rust toolchain channel as stable and documents the toolchain resolution behavior affecting std availability during lint builds.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: pinning the Rust toolchain to make soldr build fastled-lint via rustup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/soldr-rust-toolchain-pin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Without a repo-root pin, soldr resolves rustc from PATH. On hosts where a
non-rustup Rust shadows rustup (e.g. chocolatey's x86_64-pc-windows-gnu
build), soldr still canonicalizes the build target to
x86_64-pc-windows-msvc and every crate fails with E0463 (can't find crate
for `std`). Pinning the toolchain routes resolution through rustup, which
always carries the host target's std.

Co-Authored-By: Claude <[email protected]>
@zackees
zackees force-pushed the fix/soldr-rust-toolchain-pin branch from d098463 to a45214e Compare July 27, 2026 17:03
@zackees
zackees merged commit a45214e into master Jul 27, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jul 27, 2026
@zackees
zackees deleted the fix/soldr-rust-toolchain-pin branch August 21, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant