-
Notifications
You must be signed in to change notification settings - Fork 14
show-targets #36 #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
show-targets #36 #79
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
848a198
show-targets
alphastrata 5570a22
Merge branch 'main' into show_targets
alphastrata 97b56dd
TARGET_SPECS has them all at comp time
alphastrata a617029
Update methodology of retrieving targets.
alphastrata b4ca3e8
filter earlier on to do less hashing.
alphastrata 243b1dd
check dir exists earlier on.
alphastrata c96b613
use same error conventions as already in codebase (anyhow)
alphastrata 39774f1
docs, cleanups
alphastrata b438d7d
chore: silence clippy
alphastrata 1b25b5a
create `mod target_specs` and move all related code there
Firestar99 ccd2e25
refactor `update_spec_files` to allow querying `target_specs` dir wit…
Firestar99 76aa6af
make `show targets` use new `target_specs` path querying
Firestar99 37e32c3
fix clippy
Firestar99 042da7e
update docs on target specs
Firestar99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot guarantee that the end user has
spirv-val
installed on their system. Cargo gpu compilesspirv-tools
itself when buildingrustc_codegen_spirv
and statically links it, and in theory you'd have to ask that one.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep -- had feeling there'd be a better way. TY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just use
pub use include_str::TARGET_SPECS;
no?~/.cache/rust-gpu/codegen/<version_string>/target-specs/
's dir contents would be more tedious & obviously non friendly to those unfortunate enough to have to develop on Windows.It wouldn't be too hard (I think?) to whip up a const fn that just lists of the ones that were used to compile
cargo gpu
itself, but it seems a shame to support only specs that were compiled in during install... no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note where that symbol is coming from:
cargo-gpu/crates/cargo-gpu/src/legacy_target_specs.rs
Lines 1 to 4 in b497234
If future versions of rust-gpu introduce new targets (such as
spirv-unknown-vulkan1.3
), they won't be listed. Which also means targets are dependent on the version of rust-gpu used. I'd recommend doing the same ascargo build
does, have a--shader-crate
arg that defaults to./
.