cargo lambda build installs unintended stable toolchain · Issue #894 · cargo-lambda/cargo-lambda · GitHub
Skip to content

cargo lambda build installs unintended stable toolchain #894

Closed

Description

@Creanciel

Description

When running cargo lambda build in an environment where only a specific toolchain version is installed (e.g., 1.90.0 or 1.91.0), the command automatically installs the stable toolchain instead of using the currently active toolchain.

Steps to Reproduce

  1. Install only a specific toolchain version (e.g., 1.90.0 or 1.91.0)
  2. Verify the active toolchain with rustup show
  3. Run cargo lambda build --release --target aarch64-unknown-linux-musl
  4. Observe that rustup +stable target add ... is executed, installing the stable toolchain

Expected Behavior

The command should use the currently active toolchain (e.g., 1.90.0) and add the target component to that toolchain: rustup +1.90.0 target add aarch64-unknown-linux-musl

Actual Behavior

The command attempts to use the stable toolchain, which triggers an installation: rustup +stable target add aarch64-unknown-linux-musl

Possible Cause

In crates/cargo-lambda-build/src/toolchain.rs:17-22, the channel type (Channel::Stable, etc.) is directly converted to a toolchain name string ("stable", etc.). However, while 1.90.0 is from the stable channel, the toolchain names "1.90.0" and "stable" refer to different toolchains in rustup.

Activity

  1. calavera commented on Nov 3, 2025

    @calavera
    Collaborator

    Thanks for reporting this. Feel free to open a PR to have a better experience on this area.

  2. github-actions commented on Feb 14, 2026

    @github-actions
    Contributor

    This issue has been automatically locked. Create a new discussion if you'd like to continue the conversation. https://github.com/cargo-lambda/cargo-lambda/discussions/new?category=general

  3. locked as resolved and limited conversation to collaborators on Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions