Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

rust-toolchain.toml breaks cargo gpu #83

@LegNeato

Description

@LegNeato

I followed the readme, force installed, and cargo-gpu did not work.

[package]
name = "triangle"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["dylib"]

[dependencies]
spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu.git", branch = "main" }

I get:

cargo gpu build
[2025-06-11T05:46:30Z ERROR cargo_gpu] `cargo metadata` exited with an error: error: failed to run `rustc` to learn about target-specific information

    Caused by:
      process didn't exit successfully: `/Users/legnitto/.rustup/toolchains/nightly-2024-11-22-aarch64-apple-darwin/bin/rustc - --crate-name ___ --print=file-names --target spirv-unknown-vulkan1.2 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
      --- stderr
      error: Error loading target specification: Could not find specification for target "spirv-unknown-vulkan1.2". Run `rustc --print target-list` for a list of built-in targets


Error: `cargo metadata` exited with an error: error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/Users/legnitto/.rustup/toolchains/nightly-2024-11-22-aarch64-apple-darwin/bin/rustc - --crate-name ___ --print=file-names --target spirv-unknown-vulkan1.2 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: Error loading target specification: Could not find specification for target "spirv-unknown-vulkan1.2". Run `rustc --print target-list` for a list of built-in targets

Running with RUST_LOG=trace gave me nothing useful.

I had this rust-toolchain.toml file:

[toolchain]
channel = "nightly-2024-11-22"
components = ["rust-src", "rustc-dev", "llvm-tools"]

Deleting the file made cargo gpu build work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions