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

fix: bumped bytemuck and itoa#54

Merged
schell merged 2 commits intomainfrom
fix/spirv-builder-cli-bump-bytemuck-itoa
Mar 13, 2025
Merged

fix: bumped bytemuck and itoa#54
schell merged 2 commits intomainfrom
fix/spirv-builder-cli-bump-bytemuck-itoa

Conversation

@schell
Copy link
Copy Markdown
Collaborator

@schell schell commented Mar 9, 2025

This fixes an error where spirv-builder-cli fails to compile because of unresolved dependencies on bytemuck and itoa.

Here's my output when trying to compile renderling, which targets rust-gpu 6e2c84d:

renderling on  feature/shadow-mapping [$!] via 🦀 v1.84.1 took 4s 
❯ RUST_LOG=trace cargo shaders
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.06s
     Running `target/debug/xtask compile-shaders`
[2025-03-09T18:46:49Z DEBUG renderling_build] cargo_manifest_dir: "/Users/schell/code/renderling/crates/renderling"
[2025-03-09T18:46:49Z INFO  xtask] Calling `cargo gpu /Users/schell/code/renderling/crates/renderling
[2025-03-09T18:46:49Z TRACE cargo_gpu] CLI args: [
        "/Users/schell/.cargo/bin/cargo-gpu",
        "build",
        "--shader-crate",
        "/Users/schell/code/renderling/crates/renderling",
    ]
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] Querying Cargo metadata for "/Users/schell/code/renderling/crates/renderling/Cargo.toml"
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] looking for workspace metadata
[2025-03-09T18:46:49Z TRACE cargo_gpu::metadata] workspace_metadata: Object {}
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] looking for crate metadata
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] Matching shader crate path with manifest path: /Users/schell/code/renderling/crates/renderling/Cargo.toml == /Users/schell/code/renderling/crates/example/Cargo.toml?
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] Matching shader crate path with manifest path: /Users/schell/code/renderling/crates/renderling/Cargo.toml == /Users/schell/code/renderling/crates/loading-bytes/Cargo.toml?
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] Matching shader crate path with manifest path: /Users/schell/code/renderling/crates/renderling/Cargo.toml == /Users/schell/code/renderling/crates/renderling/Cargo.toml?
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] ...matches! Getting metadata
[2025-03-09T18:46:49Z TRACE cargo_gpu::metadata] crate_metadata: Object {
        "build": Object {
            "multimodule": Bool(true),
            "output_dir": String("shaders"),
        },
        "install": Object {
            "auto_install_rust_toolchain": Bool(true),
        },
    }
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] found output-dir path in crate metadata: String("shaders")
[2025-03-09T18:46:49Z DEBUG cargo_gpu::metadata] setting that to be relative to the Cargo.toml it was found in: /Users/schell/code/renderling/crates/renderling/shaders
[2025-03-09T18:46:49Z DEBUG cargo_gpu] building with final merged arguments: Build {
        install: Install {
            spirv_install: InstallArgs {
                dylib_path: "INTERNALLY_SET",
                shader_crate: "/Users/schell/code/renderling/crates/renderling",
                spirv_builder_source: None,
                spirv_builder_version: None,
                rust_toolchain: None,
                force_spirv_cli_rebuild: false,
                auto_install_rust_toolchain: true,
            },
        },
        build_args: BuildArgs {
            output_dir: "/Users/schell/code/renderling/crates/renderling/shaders",
            watch: false,
            no_default_features: false,
            features: [],
            target: "spirv-unknown-vulkan1.2",
            shader_target: "spirv-unknown-vulkan1.2",
            deny_warnings: false,
            debug: false,
            capability: [],
            extension: [],
            multimodule: true,
            spirv_metadata: None,
            relax_struct_store: false,
            relax_logical_pointer: false,
            relax_block_layout: false,
            uniform_buffer_standard_layout: false,
            scalar_block_layout: false,
            skip_block_layout: false,
            preserve_bindings: false,
        },
    }
[2025-03-09T18:46:49Z INFO  cargo_gpu::install] cache directory is '/Users/schell/Library/Caches/rust-gpu'
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Running `cargo tree` on /Users/schell/code/renderling/crates/renderling
[2025-03-09T18:46:49Z TRACE cargo_gpu::spirv_source]   found Some("spirv-std v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)")
[2025-03-09T18:46:49Z TRACE cargo_gpu::spirv_source] parsing spirv-std source and version from def: 'spirv-std v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)'
[2025-03-09T18:46:49Z TRACE cargo_gpu::spirv_source] parsing git source from version: 'v0.9.0' and uri: 'https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d' and fragment: 6e2c84d4
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsed `rust-gpu` source and version: Git { url: "https://github.com/Rust-GPU/rust-gpu", rev: "6e2c84d" }
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Not cloning `rust-gpu` repo (https://github.com/Rust-GPU/rust-gpu) as it already exists at /Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Checking out `rust-gpu` repo at /Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d to 6e2c84d
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Getting `rust-gpu` version date from /Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsed date for version 6e2c84d: 2025-01-21
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsing `rust-toolchain.toml` at "/Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d" for the used toolchain
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsed version, date and toolchain channel from shader-defined `rust-gpu`: Git { url: "https://github.com/Rust-GPU/rust-gpu", rev: "6e2c84d" }, 2025-01-21, nightly-2024-11-22
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_cli] toolchain nightly-2024-11-22 is already installed
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_cli] all required components are installed
[2025-03-09T18:46:49Z DEBUG cargo_gpu::install] writing spirv-builder-cli source files into '/Users/schell/Library/Caches/rust-gpu/spirv-builder-cli/https___github_com_Rust-GPU_rust-gpu+6e2c84d+nightly-2024-11-22'
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Running `cargo tree` on /Users/schell/code/renderling/crates/renderling
[2025-03-09T18:46:49Z TRACE cargo_gpu::spirv_source]   found Some("spirv-std v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)")
[2025-03-09T18:46:49Z TRACE cargo_gpu::spirv_source] parsing spirv-std source and version from def: 'spirv-std v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)'
[2025-03-09T18:46:49Z TRACE cargo_gpu::spirv_source] parsing git source from version: 'v0.9.0' and uri: 'https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d' and fragment: 6e2c84d4
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsed `rust-gpu` source and version: Git { url: "https://github.com/Rust-GPU/rust-gpu", rev: "6e2c84d" }
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Not cloning `rust-gpu` repo (https://github.com/Rust-GPU/rust-gpu) as it already exists at /Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Checking out `rust-gpu` repo at /Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d to 6e2c84d
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Getting `rust-gpu` version date from /Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsed date for version 6e2c84d: 2025-01-21
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsing `rust-toolchain.toml` at "/Users/schell/Library/Caches/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+6e2c84d" for the used toolchain
[2025-03-09T18:46:49Z DEBUG cargo_gpu::spirv_source] Parsed version, date and toolchain channel from shader-defined `rust-gpu`: Git { url: "https://github.com/Rust-GPU/rust-gpu", rev: "6e2c84d" }, 2025-01-21, nightly-2024-11-22
[2025-03-09T18:46:49Z DEBUG cargo_gpu::install] writing Cargo.toml
[2025-03-09T18:46:49Z DEBUG cargo_gpu::install] writing Cargo.lock
[2025-03-09T18:46:49Z DEBUG cargo_gpu::install] writing src/main.rs
[2025-03-09T18:46:49Z DEBUG cargo_gpu::install] writing src/lib.rs
[2025-03-09T18:46:49Z DEBUG cargo_gpu::install] writing src/args.rs
🦀 Compiling shader-specific `spirv-builder-cli` for /Users/schell/code/renderling/crates/renderling
[2025-03-09T18:46:49Z DEBUG cargo_gpu::install] building artifacts with `cd "/Users/schell/Library/Caches/rust-gpu/spirv-builder-cli/https___github_com_Rust-GPU_rust-gpu+6e2c84d+nightly-2024-11-22" && "cargo" "+nightly-2024-11-22" "build" "--release" "--no-default-features" "--features" "spirv-builder-0_10"`
    Updating git repository `https://github.com/Rust-GPU/rust-gpu`
    Updating crates.io index
error: failed to select a version for `bytemuck`.
    ... required by package `rustc_codegen_spirv v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)`
    ... which satisfies git dependency `rustc_codegen_spirv` of package `spirv-builder v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)`
    ... which satisfies git dependency `spirv-builder-pre-cli` of package `spirv-builder-cli v0.1.0 (/Users/schell/Library/Caches/rust-gpu/spirv-builder-cli/https___github_com_Rust-GPU_rust-gpu+6e2c84d+nightly-2024-11-22)`
versions that meet the requirements `^1.20.0` are: 1.22.0, 1.21.0, 1.20.0

all possible versions conflict with previously selected packages.

  previously selected package `bytemuck v1.19.0`
    ... which satisfies dependency `bytemuck = "^1.12.3"` (locked to 1.19.0) of package `spirt v0.4.0`
    ... which satisfies dependency `spirt = "^0.4.0"` (locked to 0.4.0) of package `rustc_codegen_spirv v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)`
    ... which satisfies git dependency `rustc_codegen_spirv` of package `spirv-builder v0.9.0 (https://github.com/Rust-GPU/rust-gpu?rev=6e2c84d#6e2c84d4)`
    ... which satisfies git dependency `spirv-builder-pre-cli` of package `spirv-builder-cli v0.1.0 (/Users/schell/Library/Caches/rust-gpu/spirv-builder-cli/https___github_com_Rust-GPU_rust-gpu+6e2c84d+nightly-2024-11-22)`

failed to select a version for `bytemuck` which could resolve this conflict
[2025-03-09T18:46:50Z ERROR cargo_gpu] ...build error!
Error: ...build error!

@schell
Copy link
Copy Markdown
Collaborator Author

schell commented Mar 9, 2025

@tombh I thought I had already added you as a maintainer, but I guess not. I've sent you an invite. Once you've accepted I can request your review here :)

@schell
Copy link
Copy Markdown
Collaborator Author

schell commented Mar 9, 2025

renderling seems to build just fine without these changes on your your branch for

...so maybe these changes are extraneous?

@schell
Copy link
Copy Markdown
Collaborator Author

schell commented Mar 9, 2025

Ah, yes, I see your branch has bumped these as well, though not as far as my changes.

@tombh
Copy link
Copy Markdown
Collaborator

tombh commented Mar 9, 2025

Just a quick reply to say I got the invitation, thanks. And that I'm trying to remember how we support this Cargo.lock across all our supported spirv-std versions? But of course, if the CI tests are passing then there's nothing urgent to worry about. And of course updating these deps even further should be fine.

@schell
Copy link
Copy Markdown
Collaborator Author

schell commented Mar 9, 2025

I'll rebase and run with the new CI improvements 👍

@schell schell requested a review from tombh March 13, 2025 00:29
@schell schell merged commit ea3f5ed into main Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants