-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Target Specific Compilation #7076
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
Target Specific Compilation #7076
Conversation
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.
Nice! It looks worthy of a changelog entry.
Changelog added |
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.
wow. that's it. I think you really figured it out! <3
Apart from the mostly doc oriented comments I left, there's some code here that you need to patch up now as part of this change
wgpu-core/platform-features/windows-linux-android-emscripten/src/lib.rs
Outdated
Show resolved
Hide resolved
wgpu-core/platform-features/windows-linux-android-emscripten/Cargo.toml
Outdated
Show resolved
Hide resolved
wgpu-core/platform-features/windows-linux-android-emscripten/Cargo.toml
Outdated
Show resolved
Hide resolved
…onditional-compilation # Conflicts: # CHANGELOG.md
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. very happy about this now. shipping time!
# The target limitation here isn't needed, but prevents more than one of these | ||
# platform crates from being included in the build at a time, preventing users | ||
# from getting confused by seeing them in the list of crates. | ||
[target.'cfg(target_vendor = "apple")'.dependencies] | ||
wgpu-core-deps-apple = { workspace = true, optional = true } | ||
[target.'cfg(target_os = "emscripten")'.dependencies] | ||
wgpu-core-deps-emscripten = { workspace = true, optional = true } | ||
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies] | ||
wgpu-core-deps-wasm = { workspace = true, optional = true } | ||
[target.'cfg(any(windows, target_os = "linux", target_os = "android"))'.dependencies] | ||
wgpu-core-deps-windows-linux-android = { workspace = true, optional = true } |
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.
clever! it's technically also a lil bit faster because then there's a smaller number of crates that cargo has to dispatch and makes the --timings
report better
ah shoot. I forgot again about that piece. I'll do a follow-up! |
Further attempt target specific stuff
Closes #7064
Closes #6949
Closes #3514