diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64e4899434..bcb5f50f28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -343,6 +343,8 @@ jobs: run: cargo test -p test_win32_arrays --target ${{ matrix.target }} - name: Test test_window_long run: cargo test -p test_window_long --target ${{ matrix.target }} + - name: Test test_windows_std + run: cargo test -p test_windows_std --target ${{ matrix.target }} - name: Test test_winrt run: cargo test -p test_winrt --target ${{ matrix.target }} - name: Test tool_bindgen @@ -363,10 +365,10 @@ jobs: run: cargo test -p tool_test_all --target ${{ matrix.target }} - name: Test tool_workspace run: cargo test -p tool_workspace --target ${{ matrix.target }} - - name: Test tool_yml - run: cargo test -p tool_yml --target ${{ matrix.target }} - name: Clean run: cargo clean + - name: Test tool_yml + run: cargo test -p tool_yml --target ${{ matrix.target }} - name: Test windows run: cargo test -p windows --target ${{ matrix.target }} - name: Test windows-bindgen diff --git a/crates/libs/collections/Cargo.toml b/crates/libs/collections/Cargo.toml index adaf6a428d..42248136de 100644 --- a/crates/libs/collections/Cargo.toml +++ b/crates/libs/collections/Cargo.toml @@ -17,7 +17,7 @@ windows-strings = { workspace = true } [features] default = ["std"] -std = [] +std = ["windows-core/std"] [lints] workspace = true diff --git a/crates/libs/future/Cargo.toml b/crates/libs/future/Cargo.toml index 6bf653b943..c2f963dbc0 100644 --- a/crates/libs/future/Cargo.toml +++ b/crates/libs/future/Cargo.toml @@ -18,7 +18,7 @@ windows-result = { workspace = true } [features] default = ["std"] -std = [] +std = ["windows-core/std"] [lints] workspace = true diff --git a/crates/libs/numerics/Cargo.toml b/crates/libs/numerics/Cargo.toml index 05b824ce44..9bf82e9620 100644 --- a/crates/libs/numerics/Cargo.toml +++ b/crates/libs/numerics/Cargo.toml @@ -14,7 +14,7 @@ windows-link = { workspace = true } [features] default = ["std"] -std = [] +std = ["windows-core/std"] [lints] workspace = true diff --git a/crates/libs/windows/Cargo.toml b/crates/libs/windows/Cargo.toml index befaff741b..959b6216cb 100644 --- a/crates/libs/windows/Cargo.toml +++ b/crates/libs/windows/Cargo.toml @@ -35,7 +35,7 @@ rustdoc-args = ["--cfg", "docsrs"] [features] default = ["std"] docs = [] -std = ["windows-core/std"] +std = ["windows-collections/std", "windows-core/std", "windows-future/std", "windows-numerics/std"] # generated features AI = ["Foundation"] AI_MachineLearning = ["AI"] diff --git a/crates/tests/libs/windows_std/Cargo.toml b/crates/tests/libs/windows_std/Cargo.toml new file mode 100644 index 0000000000..ec05967858 --- /dev/null +++ b/crates/tests/libs/windows_std/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "test_windows_std" +version = "0.0.0" +edition = "2021" +publish = false + +[lib] +doc = false +doctest = false + +[dependencies] +windows = { workspace = true, features = ["std"] } +# the inclusion of "std" in `windows` should enable it for the following dependencies +windows-collections = { workspace = true } +windows-core = { workspace = true } +windows-future = { workspace = true } +windows-numerics = { workspace = true } diff --git a/crates/tests/libs/windows_std/src/lib.rs b/crates/tests/libs/windows_std/src/lib.rs new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/crates/tests/libs/windows_std/src/lib.rs @@ -0,0 +1 @@ + diff --git a/crates/tests/libs/windows_std/tests/test.rs b/crates/tests/libs/windows_std/tests/test.rs new file mode 100644 index 0000000000..7294921f85 --- /dev/null +++ b/crates/tests/libs/windows_std/tests/test.rs @@ -0,0 +1,19 @@ +#[test] +fn collections() { + _ = windows_collections::IIterable::::from(vec![1, 2, 3]); +} + +#[test] +fn core() { + _ = windows_core::Event::::new(); +} + +#[test] +fn future() { + windows_future::IAsyncAction::ready(Ok(())); +} + +#[test] +fn numerics() { + windows_numerics::Vector2::zero().length(); +}