Skip to content

Conversation

@Firestar99
Copy link
Member

@Firestar99 Firestar99 commented Dec 11, 2025

Wanted to simply target specs even more:

  • remove crate rustc_codegen_spirv-target-specs
    • this removes all the spirv-unknown-*.json target spec files in the repo
  • generate target specs on the fly in spirv-builder
  • spirv-builder no longer checks that target env is a known valid one:
    /// The constructors [`Self::from_target`] or [`Self::from_env`] only check whether the target is well-formed, not
    /// whether it is valid. Since `spirv-builder` is backwards compatible with older rust-gpu compilers, only the compiler
    /// itself knows what targets it can and cannot support. This also allows adding new targets to the compiler without
    /// having to update `spirv-builder` and `cargo-gpu`.
  • target validation within the compiler is untouched, to be done in a followup PR
  • cargo-gpu see Target specs v3 cargo-gpu#128
    • this cargo-gpu action shows this PR being tested against various rust-gpu releases and old revs
    • rust-gpu versions after [this PR] will still work with older cargo-gpu versions, until we update target specs in rust-gpu again (not planned anytime soon)
  • in total with cargo-gpu, ~600 lines have been removed (including json)

@Firestar99 Firestar99 marked this pull request as ready for review December 15, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants