-
Notifications
You must be signed in to change notification settings - Fork 927
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
[BREAKING] Make Shader(Module)Source::Wgsl
optional
#2890
Conversation
Okay, CI just has issues installing Rust, I will try again later. |
479bbe8
to
0ddb055
Compare
Shader(Module)Source::Wgsl
optionalShader(Module)Source::Wgsl
optional
0ddb055
to
b9a40e2
Compare
Rebased after #2872. |
213f9fd
to
4235155
Compare
763f68c
to
5150380
Compare
5150380
to
74bfaf5
Compare
Rebased again. |
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.
Ack! So sorry about this! I didn't realize the "changes requested" text doesn't get reset when the changes get addressed.
Small comments but then g2g
63c2c8d
to
1cdf0bf
Compare
1cdf0bf
to
2149d9b
Compare
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.
G2G! Please just add a changelog entry that mentions there's a new feature, but it's default.
71f5b10
to
d8780ef
Compare
Done. |
d8780ef
to
c2b303b
Compare
Checklist
cargo clippy
.RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
Discussed in Matrix.
Description
This is totally a breaking change! It also might turn out entirely unnecessary if the compile-time savings aren't worth the added complexity.
At the moment the
naga
wgsl-in
crate feature is active even when completely unnecessary. This addresses it by gatingShader(Module)Source::Wgsl
behind a newwgsl
crate feature, like withShaderSource::Glsl
for example. The addedwgsl
crate feature is also active by default.Code quality is definitely a bit worse with all of these
#[cfg(...)]
now. CI time is increased because--no-default-features
has to be tested.I also didn't know what to do about
Shader(Module)Source
s lifetime, at the moment the lifetime is not present when the only active variant isNaga
, which I consider very user unfriendly and could only be fixed by either stop usingCow
or adding a dummy lifetime to theNaga
variant.This could also be solved by #2903, so maybe we should merge that first.(can't bind'a
to the'static
inCow
)I also had to increase the MSRV to 1.60 to not unnecessarily pull in
wgpu-core
on WASM by using the weak dependency feature.Testing
Added additional runs with
--no-default-features
in the CI.