Skip to content

Commit

Permalink
Use workspace dependencies where practical (#3248)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Sep 4, 2024
1 parent 143ab9b commit edef61b
Show file tree
Hide file tree
Showing 122 changed files with 200 additions and 187 deletions.
13 changes: 13 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ exclude = [
rust_2018_idioms = { level = "warn", priority = -1 }
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib, windows_debugger_visualizer, windows_slim_errors)'] }

[workspace.dependencies]
cppwinrt = { path = "crates/libs/cppwinrt" }
windows = { path = "crates/libs/windows" }
windows-bindgen = { path = "crates/libs/bindgen" }
windows-core = { path = "crates/libs/core" }
windows-metadata = { path = "crates/libs/metadata" }
windows-registry = { path = "crates/libs/registry" }
windows-result = { path = "crates/libs/result" }
windows-strings = { path = "crates/libs/strings" }
windows-sys = { path = "crates/libs/sys" }
windows-targets = { path = "crates/libs/targets" }
windows-version = { path = "crates/libs/version" }
2 changes: 1 addition & 1 deletion crates/samples/components/json_validator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jsonschema = { version = "0.18", default-features = false }
serde_json = {version = "1.0", default-features = false }

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_System_Com",
]
2 changes: 1 addition & 1 deletion crates/samples/components/json_validator_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
cc = "1.0"

[dependencies.windows-targets]
path = "../../../../crates/libs/targets"
workspace = true

# TODO: this causes a warning about lack of linkage target. The point is to ensure that this binary dependency is built first but
# Cargo doesn't respect cdylib targets. https://github.com/rust-lang/cargo/issues/7825
Expand Down
6 changes: 3 additions & 3 deletions crates/samples/components/json_validator_winrt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jsonschema = { version = "0.18", default-features = false }
serde_json = {version = "1.0", default-features = false }

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"implement",
"Win32_System_WinRT",
]

[dependencies.windows-core]
path = "../../../libs/core"
workspace = true

[build-dependencies.windows-bindgen]
path = "../../../libs/bindgen"
workspace = true
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ edition = "2021"
publish = false

[dev-dependencies.windows-core]
path = "../../../libs/core"
workspace = true

[dev-dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_Foundation",
]

[build-dependencies.windows-bindgen]
path = "../../../libs/bindgen"
workspace = true

# TODO: this causes a warning about lack of linkage target. The point is to ensure that this binary dependency is built first but
# Cargo doesn't respect cdylib targets. https://github.com/rust-lang/cargo/issues/7825
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ publish = false
cc = "1.0"

[build-dependencies.cppwinrt]
path = "../../../../crates/libs/cppwinrt"
workspace = true

[dependencies.windows-targets]
path = "../../../../crates/libs/targets"
workspace = true

# TODO: this causes a warning about lack of linkage target. The point is to ensure that this binary dependency is built first but
# Cargo doesn't respect cdylib targets. https://github.com/rust-lang/cargo/issues/7825
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/counter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_System_Performance",
]
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/create_window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_Graphics_Gdi",
"Win32_System_LibraryLoader",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/delay_load/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_System_LibraryLoader",
]
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/enum_windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_UI_WindowsAndMessaging",
]
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/message_box/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_UI_WindowsAndMessaging",
"Win32_UI_Shell",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/privileges/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_Security",
"Win32_System_Threading",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/task_dialog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_UI_Controls",
"Win32_UI_WindowsAndMessaging",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows-sys/thread_pool_work/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows-sys]
path = "../../../libs/sys"
workspace = true
features = [
"Win32_System_Threading",
]
4 changes: 2 additions & 2 deletions crates/samples/windows/bits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"implement",
"Win32_System_Com",
"Win32_Networking_BackgroundIntelligentTransferService",
]

[dependencies.windows-core]
path = "../../../libs/core"
workspace = true
2 changes: 1 addition & 1 deletion crates/samples/windows/com_uri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_System_Com",
]
2 changes: 1 addition & 1 deletion crates/samples/windows/consent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Security_Credentials_UI",
"Win32_System_WinRT",
Expand Down
4 changes: 2 additions & 2 deletions crates/samples/windows/core_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"implement",
"ApplicationModel_Core",
Expand All @@ -16,4 +16,4 @@ features = [
]

[dependencies.windows-core]
path = "../../../libs/core"
workspace = true
2 changes: 1 addition & 1 deletion crates/samples/windows/counter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_System_Performance",
]
2 changes: 1 addition & 1 deletion crates/samples/windows/create_window/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_Graphics_Gdi",
"Win32_System_LibraryLoader",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/credentials/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_Security_Credentials"
]
2 changes: 1 addition & 1 deletion crates/samples/windows/data_protection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Storage_Streams",
"Security_Cryptography_DataProtection",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/dcomp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
rand = "0.8.5"

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Foundation_Numerics",
"Win32_Graphics_Direct2D_Common",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/delay_load/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_System_LibraryLoader",
]
2 changes: 1 addition & 1 deletion crates/samples/windows/device_watcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Devices_Enumeration",
"Foundation_Collections",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/direct2d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Foundation_Numerics",
"Win32_System_Com",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/direct3d12/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
array-init = "2.0.0"

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_Graphics_Direct3D_Fxc",
"Win32_Graphics_Direct3D12",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/enum_windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_UI_WindowsAndMessaging",
]
2 changes: 1 addition & 1 deletion crates/samples/windows/file_dialogs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_UI_Shell_Common",
"Win32_System_Com",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/kernel_event/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_Security",
"Win32_System_Threading",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/memory_buffer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Foundation",
"Win32_System_WinRT",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/message_box/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_UI_WindowsAndMessaging",
"Win32_UI_Shell",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/ocr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Media_Ocr",
"Graphics_Imaging",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/overlapped/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_Security",
"Win32_Storage_FileSystem",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/privileges/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_Security",
"Win32_System_Threading",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/rss/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Foundation_Collections",
"Web_Syndication",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_System_Com",
"Win32_System_Ole",
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/simple/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"UI",
]
2 changes: 1 addition & 1 deletion crates/samples/windows/spellchecker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies.windows]
path = "../../../libs/windows"
workspace = true
features = [
"Win32_System_Com",
"Win32_Globalization",
Expand Down
Loading

0 comments on commit edef61b

Please sign in to comment.