Skip to content

Target declaration refactor#491

Merged
Firestar99 merged 2 commits intomainfrom
target-decl
Apr 17, 2026
Merged

Target declaration refactor#491
Firestar99 merged 2 commits intomainfrom
target-decl

Conversation

@Firestar99
Copy link
Copy Markdown
Member

@Firestar99 Firestar99 commented Dec 17, 2025

Supersedes #311

Refactors the target declaration within rustc_codegen_spirv to no longer be dependent on the spirv_tools::TargetEnv enum, but a custom representation within rustc_codegen_spirv itself. The new enum SpirvTarget first splits into "types of targets", like VulkanTarget, UniversalTarget and OpenGLTarget, which can represent arbitrary versions of e.g. Vulkan. This is heavily inspired by @eddyb's feedback in #311 (comment). Also see #484 refactoring spirv-builder's target declaration to not do any target validation, but leave that to the codegen backend aka this PR.

This is a prerequisite for adding naga transpilation targets in the followup PR #493. And opens up the path to make the spirv-tools dependency optional.

@Firestar99 Firestar99 force-pushed the target-decl branch 2 times, most recently from 052cb76 to a9c36bd Compare December 17, 2025 15:15
This was referenced Dec 17, 2025
@Firestar99 Firestar99 marked this pull request as ready for review December 19, 2025 11:25
Base automatically changed from target-specs-v3 to main December 25, 2025 11:45
@Firestar99 Firestar99 force-pushed the target-decl branch 4 times, most recently from 258f0e3 to 197193e Compare March 10, 2026 13:12
@Firestar99 Firestar99 added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit e938af9 Apr 17, 2026
23 checks passed
@Firestar99 Firestar99 deleted the target-decl branch April 17, 2026 11:16
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.

2 participants