Conversation
Remove trace, replay features from wgpu-types
There was a problem hiding this comment.
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.
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
Connections
#3609
Description
Allows using feature
serdeonwgpu,wgpu-coreandwgpu-types.wgpu-typesno longer hastraceandreplayfeatures, but an implicitserdefeature.wgpu-corehas an explicitserdefeature and removes theserial-passfeature.wgpunow has an explicitserdefeature.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
wgpuandwgpu-corethe usage fortraceandreplayshould not have changed. If you are usingserial-passyou should useserdeinstead. Forwgpu-typesif you have previously enabled thetraceorreplayfeature you need to migrate toserde.Testing
cargo test --package <package> --features <feature>for the following packages:
wgpu-types,wgpu-core,wgpufor 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 testto run tests. (yes, and it fails in some places, no sure what to do with the results)CHANGELOG.md. See simple instructions inside file.