Commit e313d4c
committed
Use shader's Cargo.toml for rust-gpu version/toolchain
We can still override the version and toolchain with CLI args. This
commit just changes the defaults.
I feel like there could be a lot of edge cases for this implementation.
So I consider it more of a first draft.
Notable changes:
* `Spirv` renamed to `SpirvCli`.
* New `impl SpirvSource` that does all the shader crate querying.
* CLI args change: `--spirv-builder` is now split into
`--spirv-builder-source` and `--spirv-builder-version`.
* `--shader-crate` now lives on the `install` subcommand, which
because it is inherited by `build` (where it was originally), means it
doesn't make much of a difference.
* The full build test now has a teardown function making it idempotent.
* Cache folder structure now has sub folders for `spirv-builder-cli`'s
and `rust-gpu` repos.
Things to consider:
* Can we remove `TARGET_SPECS` now, because we have a copy of the
`rust-gpu` repo, we can get them from there instead?
* We have to copy the `shader-crate-template` outside of the workspace
to get the tests to run. This is because recent Cargo now uses version
4 in `Cargo.lock` and the shader crate toolchain uses an older version
of Cargo that doesn't recognise that version. But that doesn't seem
right. Why is Cargo looking outside of the `shader-crate-template`
anyway??
* What's the UX expectations for changing `spirv-std` versions or
overriding `rust-gpu` versions and toolchain? I think in most cases
`spirv-builder-cli` rebuilds should occur because the changes will
cause cache directory changes. But I think it'd be good to at least
manually test this.
* Should the main build test be moved out into an integrations tests
folder?
* I'd still like to test each `spirv-builder-cli` feature, ie:
`spirv-builder-pre-cli` and `spirv-builder-0_10`. We're currently only
testing `spirv-builder-pre-cli`.1 parent 87de5da commit e313d4c
File tree
15 files changed
+883
-320
lines changed- .github/workflows
- crates
- cargo-gpu
- src
- shader-crate-template
- spirv-builder-cli
- src
15 files changed
+883
-320
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | | - | |
28 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
0 commit comments