-
Notifications
You must be signed in to change notification settings - Fork 938
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
Feature/serde feature #5149
Feature/serde feature #5149
Conversation
Remove trace, replay features from wgpu-types
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.
Please add a changelog entry, fairly important to highlight this feature config change :)
Handling of serial-pass
looks broken to me but I'm a bit on the fence whether we still need this one 🤔.
I'm actually overall here with what @cwfitzgerald's comment on the issue and would suggest joining all of serde
, serial-pass
, serialize
and deserialize
to one feature, I doubt anyone needs this level of granularity realistically.
Anyways, thanks so much for looking into this! Happy to merge once the serial-pass
story, docs and changelog is sorted out! :)
Thanks for the heads up about |
Oh and about merging everything to serde. I am also fine with that. Just let me know and I will try to do the necessary changes. |
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.
thanks for the fixes! changelog looks great
Yeah if you don't mind changing it again right away I'd say we should go with just serde
, it makes all the cfgs so much simpler and reduces the number of feature flags and thus possible permutations by a lot.
Yeah, I will try that. On wgpu-types level it is trivial, but I am not sure how to approach it for wgpu-core and wgpu. Edit: I could replace |
I was thinking simpler still that both |
fyi I just posted about this also on the wgpu Matrix chat room just in case anyone has a good reason that we're not seeing right now on why deserialize & serialize should stay separate :) |
With your earlier comment about |
Ah apologies for the confusion! If we go with |
26537af
to
8ce9c83
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.
awesome, yeah this is much cleaner! Will merge after changelog hickup is resolved!
Connections
#3609
Description
Allows using feature
serde
onwgpu
,wgpu-core
andwgpu-types
.wgpu-types
no longer hastrace
andreplay
features, but an implicitserde
feature.wgpu-core
has an explicitserde
feature and removes theserial-pass
feature.wgpu
now has an explicitserde
feature.Almost all occurrences of
cfg_attr(feature = "trace")
andcfg_attr(feature = "replay")
have been replaced withcfg_attr(feature = "serialize")
andcfg_attr(feature = "deserialize")
respectively.For
wgpu
andwgpu-core
the usage fortrace
andreplay
should not have changed. If you are usingserial-pass
you should useserde
instead. Forwgpu-types
if you have previously enabled thetrace
orreplay
feature you need to migrate toserde
.Testing
cargo test --package <package> --features <feature>
for the following packages:
wgpu-types
,wgpu-core
,wgpu
for the following features:
"None"
,serde
, (trace
,replay
)[if available] [*no combinations]Compile timings
Comparing 273684f with f748c43 on debug.
With default features takes about 25 sec.
With serde takes around the same time (38 sec).
With deserialize (on first commit) takes about the same amount of time (38 sec).
With serialize takes about 27 sec.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
(fails somewhere in winit)cargo xtask test
to run tests. (yes, and it fails in some places, no sure what to do with the results)CHANGELOG.md
. See simple instructions inside file.