diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index db83ae29d7..6c246d5c49 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -31,6 +31,8 @@ jobs: uses: ./.github/actions/fix-environment - name: Clippy cppwinrt run: cargo clippy -p cppwinrt + - name: Clippy helpers + run: cargo clippy -p helpers - name: Clippy riddle run: cargo clippy -p riddle - name: Clippy sample_bits @@ -269,8 +271,6 @@ jobs: run: cargo clippy -p tool_bindings - name: Clippy tool_gnu run: cargo clippy -p tool_gnu - - name: Clippy tool_lib - run: cargo clippy -p tool_lib - name: Clippy tool_license run: cargo clippy -p tool_license - name: Clippy tool_msvc diff --git a/.github/workflows/no-default-features.yml b/.github/workflows/no-default-features.yml index 558582dc73..07f0615636 100644 --- a/.github/workflows/no-default-features.yml +++ b/.github/workflows/no-default-features.yml @@ -29,6 +29,8 @@ jobs: uses: ./.github/actions/fix-environment - name: Check cppwinrt run: cargo check -p cppwinrt --no-default-features + - name: Check helpers + run: cargo check -p helpers --no-default-features - name: Check windows run: cargo check -p windows --no-default-features - name: Check windows-bindgen diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0589234aee..860482483e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,8 @@ jobs: run: cargo clean - name: Test cppwinrt run: cargo test -p cppwinrt --target ${{ matrix.target }} ${{ matrix.etc }} + - name: Test helpers + run: cargo test -p helpers --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test riddle run: cargo test -p riddle --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test sample_bits @@ -151,10 +153,10 @@ jobs: run: cargo test -p test_agile_reference --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_alternate_success_code run: cargo test -p test_alternate_success_code --target ${{ matrix.target }} ${{ matrix.etc }} - - name: Test test_arch - run: cargo test -p test_arch --target ${{ matrix.target }} ${{ matrix.etc }} - name: Clean run: cargo clean + - name: Test test_arch + run: cargo test -p test_arch --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_arch_feature run: cargo test -p test_arch_feature --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_array @@ -253,10 +255,10 @@ jobs: run: cargo test -p test_reserved --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_resources run: cargo test -p test_resources --target ${{ matrix.target }} ${{ matrix.etc }} - - name: Test test_result - run: cargo test -p test_result --target ${{ matrix.target }} ${{ matrix.etc }} - name: Clean run: cargo clean + - name: Test test_result + run: cargo test -p test_result --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_return_handle run: cargo test -p test_return_handle --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_return_struct @@ -297,8 +299,6 @@ jobs: run: cargo test -p tool_bindings --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test tool_gnu run: cargo test -p tool_gnu --target ${{ matrix.target }} ${{ matrix.etc }} - - name: Test tool_lib - run: cargo test -p tool_lib --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test tool_license run: cargo test -p tool_license --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test tool_msvc diff --git a/.gitignore b/.gitignore index ca33c1fc2c..cb705afd42 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ /target *.lock *.winmd -winrt +**/src/winrt diff --git a/Cargo.toml b/Cargo.toml index 4396030fe6..4fdceb7497 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,8 @@ members = [ "crates/samples/windows/*", "crates/samples/components/*", "crates/targets/*", - "crates/tests/*", + "crates/tests/misc/*", + "crates/tests/winrt/*", "crates/tools/*", ] exclude = [ @@ -30,3 +31,4 @@ windows-strings = { path = "crates/libs/strings" } windows-sys = { path = "crates/libs/sys" } windows-targets = { path = "crates/libs/targets" } windows-version = { path = "crates/libs/version" } +helpers = { path = "crates/libs/helpers" } diff --git a/crates/tools/lib/Cargo.toml b/crates/libs/helpers/Cargo.toml similarity index 87% rename from crates/tools/lib/Cargo.toml rename to crates/libs/helpers/Cargo.toml index 231a30d851..33173d34fc 100644 --- a/crates/tools/lib/Cargo.toml +++ b/crates/libs/helpers/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "tool_lib" +name = "helpers" version = "0.0.0" edition = "2021" publish = false diff --git a/crates/libs/helpers/license-apache-2.0 b/crates/libs/helpers/license-apache-2.0 new file mode 100644 index 0000000000..b5ed4ecec2 --- /dev/null +++ b/crates/libs/helpers/license-apache-2.0 @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) Microsoft Corporation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/crates/libs/helpers/license-mit b/crates/libs/helpers/license-mit new file mode 100644 index 0000000000..9e841e7a26 --- /dev/null +++ b/crates/libs/helpers/license-mit @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/crates/tools/lib/src/lib.rs b/crates/libs/helpers/src/lib.rs similarity index 90% rename from crates/tools/lib/src/lib.rs rename to crates/libs/helpers/src/lib.rs index aa60516282..04e9fd3110 100644 --- a/crates/tools/lib/src/lib.rs +++ b/crates/libs/helpers/src/lib.rs @@ -10,16 +10,14 @@ pub enum CallingConvention { pub fn default_metadata() -> Vec { vec![ + metadata::File::new(std::include_bytes!("../../bindgen/default/Windows.winmd").to_vec()) + .expect("invalid winmd"), metadata::File::new( - std::include_bytes!("../../../libs/bindgen/default/Windows.winmd").to_vec(), + std::include_bytes!("../../bindgen/default/Windows.Win32.winmd").to_vec(), ) .expect("invalid winmd"), metadata::File::new( - std::include_bytes!("../../../libs/bindgen/default/Windows.Win32.winmd").to_vec(), - ) - .expect("invalid winmd"), - metadata::File::new( - std::include_bytes!("../../../libs/bindgen/default/Windows.Wdk.winmd").to_vec(), + std::include_bytes!("../../bindgen/default/Windows.Wdk.winmd").to_vec(), ) .expect("invalid winmd"), ] diff --git a/crates/samples/components/json_validator_winrt_client/Cargo.toml b/crates/samples/components/json_validator_winrt_client/Cargo.toml index 4cbb9efdf3..b419d190f4 100644 --- a/crates/samples/components/json_validator_winrt_client/Cargo.toml +++ b/crates/samples/components/json_validator_winrt_client/Cargo.toml @@ -16,7 +16,7 @@ features = [ [build-dependencies.windows-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 +# The build needs the output (.dll) of the component. This causes a warning about lack of linkage target. +# Cargo doesn't understand cdylib targets. https://github.com/rust-lang/cargo/issues/7825 [dependencies.sample_component_json_validator_winrt] path = "../json_validator_winrt" diff --git a/crates/samples/components/json_validator_winrt_client_cpp/Cargo.toml b/crates/samples/components/json_validator_winrt_client_cpp/Cargo.toml index 50efb87f39..5ff78996af 100644 --- a/crates/samples/components/json_validator_winrt_client_cpp/Cargo.toml +++ b/crates/samples/components/json_validator_winrt_client_cpp/Cargo.toml @@ -13,7 +13,7 @@ workspace = true [dependencies.windows-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 +# The build needs the output (.dll) of the component. This causes a warning about lack of linkage target. +# Cargo doesn't understand cdylib targets. https://github.com/rust-lang/cargo/issues/7825 [dependencies.sample_component_json_validator_winrt] path = "../json_validator_winrt" diff --git a/crates/tests/agile/Cargo.toml b/crates/tests/misc/agile/Cargo.toml similarity index 100% rename from crates/tests/agile/Cargo.toml rename to crates/tests/misc/agile/Cargo.toml diff --git a/crates/tests/agile/src/lib.rs b/crates/tests/misc/agile/src/lib.rs similarity index 100% rename from crates/tests/agile/src/lib.rs rename to crates/tests/misc/agile/src/lib.rs diff --git a/crates/tests/agile/tests/tests.rs b/crates/tests/misc/agile/tests/tests.rs similarity index 100% rename from crates/tests/agile/tests/tests.rs rename to crates/tests/misc/agile/tests/tests.rs diff --git a/crates/tests/agile_reference/Cargo.toml b/crates/tests/misc/agile_reference/Cargo.toml similarity index 100% rename from crates/tests/agile_reference/Cargo.toml rename to crates/tests/misc/agile_reference/Cargo.toml diff --git a/crates/tests/agile_reference/src/lib.rs b/crates/tests/misc/agile_reference/src/lib.rs similarity index 100% rename from crates/tests/agile_reference/src/lib.rs rename to crates/tests/misc/agile_reference/src/lib.rs diff --git a/crates/tests/agile_reference/tests/tests.rs b/crates/tests/misc/agile_reference/tests/tests.rs similarity index 100% rename from crates/tests/agile_reference/tests/tests.rs rename to crates/tests/misc/agile_reference/tests/tests.rs diff --git a/crates/tests/alternate_success_code/Cargo.toml b/crates/tests/misc/alternate_success_code/Cargo.toml similarity index 100% rename from crates/tests/alternate_success_code/Cargo.toml rename to crates/tests/misc/alternate_success_code/Cargo.toml diff --git a/crates/tests/alternate_success_code/src/lib.rs b/crates/tests/misc/alternate_success_code/src/lib.rs similarity index 100% rename from crates/tests/alternate_success_code/src/lib.rs rename to crates/tests/misc/alternate_success_code/src/lib.rs diff --git a/crates/tests/alternate_success_code/tests/test.rs b/crates/tests/misc/alternate_success_code/tests/test.rs similarity index 100% rename from crates/tests/alternate_success_code/tests/test.rs rename to crates/tests/misc/alternate_success_code/tests/test.rs diff --git a/crates/tests/arch/Cargo.toml b/crates/tests/misc/arch/Cargo.toml similarity index 100% rename from crates/tests/arch/Cargo.toml rename to crates/tests/misc/arch/Cargo.toml diff --git a/crates/tests/arch/src/lib.rs b/crates/tests/misc/arch/src/lib.rs similarity index 100% rename from crates/tests/arch/src/lib.rs rename to crates/tests/misc/arch/src/lib.rs diff --git a/crates/tests/arch/tests/sys.rs b/crates/tests/misc/arch/tests/sys.rs similarity index 100% rename from crates/tests/arch/tests/sys.rs rename to crates/tests/misc/arch/tests/sys.rs diff --git a/crates/tests/arch/tests/win.rs b/crates/tests/misc/arch/tests/win.rs similarity index 100% rename from crates/tests/arch/tests/win.rs rename to crates/tests/misc/arch/tests/win.rs diff --git a/crates/tests/arch_feature/Cargo.toml b/crates/tests/misc/arch_feature/Cargo.toml similarity index 100% rename from crates/tests/arch_feature/Cargo.toml rename to crates/tests/misc/arch_feature/Cargo.toml diff --git a/crates/tests/arch_feature/src/lib.rs b/crates/tests/misc/arch_feature/src/lib.rs similarity index 100% rename from crates/tests/arch_feature/src/lib.rs rename to crates/tests/misc/arch_feature/src/lib.rs diff --git a/crates/tests/arch_feature/tests/sys.rs b/crates/tests/misc/arch_feature/tests/sys.rs similarity index 100% rename from crates/tests/arch_feature/tests/sys.rs rename to crates/tests/misc/arch_feature/tests/sys.rs diff --git a/crates/tests/arch_feature/tests/win.rs b/crates/tests/misc/arch_feature/tests/win.rs similarity index 100% rename from crates/tests/arch_feature/tests/win.rs rename to crates/tests/misc/arch_feature/tests/win.rs diff --git a/crates/tests/array/Cargo.toml b/crates/tests/misc/array/Cargo.toml similarity index 100% rename from crates/tests/array/Cargo.toml rename to crates/tests/misc/array/Cargo.toml diff --git a/crates/tests/array/src/lib.rs b/crates/tests/misc/array/src/lib.rs similarity index 100% rename from crates/tests/array/src/lib.rs rename to crates/tests/misc/array/src/lib.rs diff --git a/crates/tests/array/tests/com.rs b/crates/tests/misc/array/tests/com.rs similarity index 100% rename from crates/tests/array/tests/com.rs rename to crates/tests/misc/array/tests/com.rs diff --git a/crates/tests/array/tests/primitive.rs b/crates/tests/misc/array/tests/primitive.rs similarity index 100% rename from crates/tests/array/tests/primitive.rs rename to crates/tests/misc/array/tests/primitive.rs diff --git a/crates/tests/array/tests/winrt.rs b/crates/tests/misc/array/tests/winrt.rs similarity index 100% rename from crates/tests/array/tests/winrt.rs rename to crates/tests/misc/array/tests/winrt.rs diff --git a/crates/tests/async/Cargo.toml b/crates/tests/misc/async/Cargo.toml similarity index 100% rename from crates/tests/async/Cargo.toml rename to crates/tests/misc/async/Cargo.toml diff --git a/crates/tests/async/src/lib.rs b/crates/tests/misc/async/src/lib.rs similarity index 100% rename from crates/tests/async/src/lib.rs rename to crates/tests/misc/async/src/lib.rs diff --git a/crates/tests/async/tests/async_info.rs b/crates/tests/misc/async/tests/async_info.rs similarity index 100% rename from crates/tests/async/tests/async_info.rs rename to crates/tests/misc/async/tests/async_info.rs diff --git a/crates/tests/async/tests/completed_finished.rs b/crates/tests/misc/async/tests/completed_finished.rs similarity index 100% rename from crates/tests/async/tests/completed_finished.rs rename to crates/tests/misc/async/tests/completed_finished.rs diff --git a/crates/tests/async/tests/completed_get.rs b/crates/tests/misc/async/tests/completed_get.rs similarity index 100% rename from crates/tests/async/tests/completed_get.rs rename to crates/tests/misc/async/tests/completed_get.rs diff --git a/crates/tests/async/tests/completed_once.rs b/crates/tests/misc/async/tests/completed_once.rs similarity index 100% rename from crates/tests/async/tests/completed_once.rs rename to crates/tests/misc/async/tests/completed_once.rs diff --git a/crates/tests/async/tests/completed_started.rs b/crates/tests/misc/async/tests/completed_started.rs similarity index 100% rename from crates/tests/async/tests/completed_started.rs rename to crates/tests/misc/async/tests/completed_started.rs diff --git a/crates/tests/async/tests/dropped.rs b/crates/tests/misc/async/tests/dropped.rs similarity index 100% rename from crates/tests/async/tests/dropped.rs rename to crates/tests/misc/async/tests/dropped.rs diff --git a/crates/tests/async/tests/error.rs b/crates/tests/misc/async/tests/error.rs similarity index 100% rename from crates/tests/async/tests/error.rs rename to crates/tests/misc/async/tests/error.rs diff --git a/crates/tests/async/tests/futures.rs b/crates/tests/misc/async/tests/futures.rs similarity index 100% rename from crates/tests/async/tests/futures.rs rename to crates/tests/misc/async/tests/futures.rs diff --git a/crates/tests/async/tests/progress.rs b/crates/tests/misc/async/tests/progress.rs similarity index 100% rename from crates/tests/async/tests/progress.rs rename to crates/tests/misc/async/tests/progress.rs diff --git a/crates/tests/async/tests/started.rs b/crates/tests/misc/async/tests/started.rs similarity index 100% rename from crates/tests/async/tests/started.rs rename to crates/tests/misc/async/tests/started.rs diff --git a/crates/tests/bcrypt/Cargo.toml b/crates/tests/misc/bcrypt/Cargo.toml similarity index 100% rename from crates/tests/bcrypt/Cargo.toml rename to crates/tests/misc/bcrypt/Cargo.toml diff --git a/crates/tests/bcrypt/src/lib.rs b/crates/tests/misc/bcrypt/src/lib.rs similarity index 100% rename from crates/tests/bcrypt/src/lib.rs rename to crates/tests/misc/bcrypt/src/lib.rs diff --git a/crates/tests/bcrypt/tests/sys.rs b/crates/tests/misc/bcrypt/tests/sys.rs similarity index 100% rename from crates/tests/bcrypt/tests/sys.rs rename to crates/tests/misc/bcrypt/tests/sys.rs diff --git a/crates/tests/bcrypt/tests/win.rs b/crates/tests/misc/bcrypt/tests/win.rs similarity index 100% rename from crates/tests/bcrypt/tests/win.rs rename to crates/tests/misc/bcrypt/tests/win.rs diff --git a/crates/tests/calling_convention/Cargo.toml b/crates/tests/misc/calling_convention/Cargo.toml similarity index 100% rename from crates/tests/calling_convention/Cargo.toml rename to crates/tests/misc/calling_convention/Cargo.toml diff --git a/crates/tests/calling_convention/src/lib.rs b/crates/tests/misc/calling_convention/src/lib.rs similarity index 100% rename from crates/tests/calling_convention/src/lib.rs rename to crates/tests/misc/calling_convention/src/lib.rs diff --git a/crates/tests/calling_convention/tests/sys.rs b/crates/tests/misc/calling_convention/tests/sys.rs similarity index 100% rename from crates/tests/calling_convention/tests/sys.rs rename to crates/tests/misc/calling_convention/tests/sys.rs diff --git a/crates/tests/calling_convention/tests/win.rs b/crates/tests/misc/calling_convention/tests/win.rs similarity index 100% rename from crates/tests/calling_convention/tests/win.rs rename to crates/tests/misc/calling_convention/tests/win.rs diff --git a/crates/tests/cfg_generic/Cargo.toml b/crates/tests/misc/cfg_generic/Cargo.toml similarity index 100% rename from crates/tests/cfg_generic/Cargo.toml rename to crates/tests/misc/cfg_generic/Cargo.toml diff --git a/crates/tests/cfg_generic/src/lib.rs b/crates/tests/misc/cfg_generic/src/lib.rs similarity index 100% rename from crates/tests/cfg_generic/src/lib.rs rename to crates/tests/misc/cfg_generic/src/lib.rs diff --git a/crates/tests/class_hierarchy/Cargo.toml b/crates/tests/misc/class_hierarchy/Cargo.toml similarity index 100% rename from crates/tests/class_hierarchy/Cargo.toml rename to crates/tests/misc/class_hierarchy/Cargo.toml diff --git a/crates/tests/class_hierarchy/src/lib.rs b/crates/tests/misc/class_hierarchy/src/lib.rs similarity index 100% rename from crates/tests/class_hierarchy/src/lib.rs rename to crates/tests/misc/class_hierarchy/src/lib.rs diff --git a/crates/tests/class_hierarchy/tests/tests.rs b/crates/tests/misc/class_hierarchy/tests/tests.rs similarity index 100% rename from crates/tests/class_hierarchy/tests/tests.rs rename to crates/tests/misc/class_hierarchy/tests/tests.rs diff --git a/crates/tests/collections/Cargo.toml b/crates/tests/misc/collections/Cargo.toml similarity index 100% rename from crates/tests/collections/Cargo.toml rename to crates/tests/misc/collections/Cargo.toml diff --git a/crates/tests/collections/src/lib.rs b/crates/tests/misc/collections/src/lib.rs similarity index 100% rename from crates/tests/collections/src/lib.rs rename to crates/tests/misc/collections/src/lib.rs diff --git a/crates/tests/collections/tests/stock_iterable.rs b/crates/tests/misc/collections/tests/stock_iterable.rs similarity index 100% rename from crates/tests/collections/tests/stock_iterable.rs rename to crates/tests/misc/collections/tests/stock_iterable.rs diff --git a/crates/tests/collections/tests/stock_map_view.rs b/crates/tests/misc/collections/tests/stock_map_view.rs similarity index 100% rename from crates/tests/collections/tests/stock_map_view.rs rename to crates/tests/misc/collections/tests/stock_map_view.rs diff --git a/crates/tests/collections/tests/stock_vector_view.rs b/crates/tests/misc/collections/tests/stock_vector_view.rs similarity index 100% rename from crates/tests/collections/tests/stock_vector_view.rs rename to crates/tests/misc/collections/tests/stock_vector_view.rs diff --git a/crates/tests/collections/tests/string_map.rs b/crates/tests/misc/collections/tests/string_map.rs similarity index 100% rename from crates/tests/collections/tests/string_map.rs rename to crates/tests/misc/collections/tests/string_map.rs diff --git a/crates/tests/component/Cargo.toml b/crates/tests/misc/component/Cargo.toml similarity index 100% rename from crates/tests/component/Cargo.toml rename to crates/tests/misc/component/Cargo.toml diff --git a/crates/tests/component/build.rs b/crates/tests/misc/component/build.rs similarity index 100% rename from crates/tests/component/build.rs rename to crates/tests/misc/component/build.rs diff --git a/crates/tests/component/src/bindings.rs b/crates/tests/misc/component/src/bindings.rs similarity index 100% rename from crates/tests/component/src/bindings.rs rename to crates/tests/misc/component/src/bindings.rs diff --git a/crates/tests/component/src/component.idl b/crates/tests/misc/component/src/component.idl similarity index 100% rename from crates/tests/component/src/component.idl rename to crates/tests/misc/component/src/component.idl diff --git a/crates/tests/component/src/lib.rs b/crates/tests/misc/component/src/lib.rs similarity index 100% rename from crates/tests/component/src/lib.rs rename to crates/tests/misc/component/src/lib.rs diff --git a/crates/tests/component_client/Cargo.toml b/crates/tests/misc/component_client/Cargo.toml similarity index 64% rename from crates/tests/component_client/Cargo.toml rename to crates/tests/misc/component_client/Cargo.toml index e1dee083e7..49ce93ac0f 100644 --- a/crates/tests/component_client/Cargo.toml +++ b/crates/tests/misc/component_client/Cargo.toml @@ -22,7 +22,7 @@ features = [ "Win32_Foundation", ] -# 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 +# The build needs the output (.dll) of the component. This causes a warning about lack of linkage target. +# Cargo doesn't understand cdylib targets. https://github.com/rust-lang/cargo/issues/7825 [dependencies.test_component] path = "../component" diff --git a/crates/tests/component_client/build.rs b/crates/tests/misc/component_client/build.rs similarity index 100% rename from crates/tests/component_client/build.rs rename to crates/tests/misc/component_client/build.rs diff --git a/crates/tests/component_client/src/bindings.rs b/crates/tests/misc/component_client/src/bindings.rs similarity index 100% rename from crates/tests/component_client/src/bindings.rs rename to crates/tests/misc/component_client/src/bindings.rs diff --git a/crates/tests/component_client/src/lib.rs b/crates/tests/misc/component_client/src/lib.rs similarity index 100% rename from crates/tests/component_client/src/lib.rs rename to crates/tests/misc/component_client/src/lib.rs diff --git a/crates/tests/const_fields/Cargo.toml b/crates/tests/misc/const_fields/Cargo.toml similarity index 100% rename from crates/tests/const_fields/Cargo.toml rename to crates/tests/misc/const_fields/Cargo.toml diff --git a/crates/tests/const_fields/src/lib.rs b/crates/tests/misc/const_fields/src/lib.rs similarity index 100% rename from crates/tests/const_fields/src/lib.rs rename to crates/tests/misc/const_fields/src/lib.rs diff --git a/crates/tests/const_fields/tests/sys.rs b/crates/tests/misc/const_fields/tests/sys.rs similarity index 100% rename from crates/tests/const_fields/tests/sys.rs rename to crates/tests/misc/const_fields/tests/sys.rs diff --git a/crates/tests/const_fields/tests/win.rs b/crates/tests/misc/const_fields/tests/win.rs similarity index 100% rename from crates/tests/const_fields/tests/win.rs rename to crates/tests/misc/const_fields/tests/win.rs diff --git a/crates/tests/const_params/Cargo.toml b/crates/tests/misc/const_params/Cargo.toml similarity index 100% rename from crates/tests/const_params/Cargo.toml rename to crates/tests/misc/const_params/Cargo.toml diff --git a/crates/tests/const_params/src/lib.rs b/crates/tests/misc/const_params/src/lib.rs similarity index 100% rename from crates/tests/const_params/src/lib.rs rename to crates/tests/misc/const_params/src/lib.rs diff --git a/crates/tests/const_params/tests/sys.rs b/crates/tests/misc/const_params/tests/sys.rs similarity index 100% rename from crates/tests/const_params/tests/sys.rs rename to crates/tests/misc/const_params/tests/sys.rs diff --git a/crates/tests/const_params/tests/win.rs b/crates/tests/misc/const_params/tests/win.rs similarity index 100% rename from crates/tests/const_params/tests/win.rs rename to crates/tests/misc/const_params/tests/win.rs diff --git a/crates/tests/const_ptrs/Cargo.toml b/crates/tests/misc/const_ptrs/Cargo.toml similarity index 100% rename from crates/tests/const_ptrs/Cargo.toml rename to crates/tests/misc/const_ptrs/Cargo.toml diff --git a/crates/tests/const_ptrs/src/lib.rs b/crates/tests/misc/const_ptrs/src/lib.rs similarity index 100% rename from crates/tests/const_ptrs/src/lib.rs rename to crates/tests/misc/const_ptrs/src/lib.rs diff --git a/crates/tests/const_ptrs/tests/test.rs b/crates/tests/misc/const_ptrs/tests/test.rs similarity index 100% rename from crates/tests/const_ptrs/tests/test.rs rename to crates/tests/misc/const_ptrs/tests/test.rs diff --git a/crates/tests/core/Cargo.toml b/crates/tests/misc/core/Cargo.toml similarity index 100% rename from crates/tests/core/Cargo.toml rename to crates/tests/misc/core/Cargo.toml diff --git a/crates/tests/core/src/lib.rs b/crates/tests/misc/core/src/lib.rs similarity index 100% rename from crates/tests/core/src/lib.rs rename to crates/tests/misc/core/src/lib.rs diff --git a/crates/tests/core/tests/array.rs b/crates/tests/misc/core/tests/array.rs similarity index 100% rename from crates/tests/core/tests/array.rs rename to crates/tests/misc/core/tests/array.rs diff --git a/crates/tests/core/tests/error.rs b/crates/tests/misc/core/tests/error.rs similarity index 100% rename from crates/tests/core/tests/error.rs rename to crates/tests/misc/core/tests/error.rs diff --git a/crates/tests/core/tests/guid.rs b/crates/tests/misc/core/tests/guid.rs similarity index 100% rename from crates/tests/core/tests/guid.rs rename to crates/tests/misc/core/tests/guid.rs diff --git a/crates/tests/core/tests/hresult.rs b/crates/tests/misc/core/tests/hresult.rs similarity index 100% rename from crates/tests/core/tests/hresult.rs rename to crates/tests/misc/core/tests/hresult.rs diff --git a/crates/tests/core/tests/unknown.rs b/crates/tests/misc/core/tests/unknown.rs similarity index 100% rename from crates/tests/core/tests/unknown.rs rename to crates/tests/misc/core/tests/unknown.rs diff --git a/crates/tests/debug/Cargo.toml b/crates/tests/misc/debug/Cargo.toml similarity index 100% rename from crates/tests/debug/Cargo.toml rename to crates/tests/misc/debug/Cargo.toml diff --git a/crates/tests/debug/src/lib.rs b/crates/tests/misc/debug/src/lib.rs similarity index 100% rename from crates/tests/debug/src/lib.rs rename to crates/tests/misc/debug/src/lib.rs diff --git a/crates/tests/debug/tests/tests.rs b/crates/tests/misc/debug/tests/tests.rs similarity index 100% rename from crates/tests/debug/tests/tests.rs rename to crates/tests/misc/debug/tests/tests.rs diff --git a/crates/tests/debugger_visualizer/Cargo.toml b/crates/tests/misc/debugger_visualizer/Cargo.toml similarity index 100% rename from crates/tests/debugger_visualizer/Cargo.toml rename to crates/tests/misc/debugger_visualizer/Cargo.toml diff --git a/crates/tests/debugger_visualizer/src/lib.rs b/crates/tests/misc/debugger_visualizer/src/lib.rs similarity index 100% rename from crates/tests/debugger_visualizer/src/lib.rs rename to crates/tests/misc/debugger_visualizer/src/lib.rs diff --git a/crates/tests/debugger_visualizer/tests/test.rs b/crates/tests/misc/debugger_visualizer/tests/test.rs similarity index 100% rename from crates/tests/debugger_visualizer/tests/test.rs rename to crates/tests/misc/debugger_visualizer/tests/test.rs diff --git a/crates/tests/deprecated/Cargo.toml b/crates/tests/misc/deprecated/Cargo.toml similarity index 100% rename from crates/tests/deprecated/Cargo.toml rename to crates/tests/misc/deprecated/Cargo.toml diff --git a/crates/tests/deprecated/src/lib.rs b/crates/tests/misc/deprecated/src/lib.rs similarity index 100% rename from crates/tests/deprecated/src/lib.rs rename to crates/tests/misc/deprecated/src/lib.rs diff --git a/crates/tests/deprecated/tests/deprecated.rs b/crates/tests/misc/deprecated/tests/deprecated.rs similarity index 100% rename from crates/tests/deprecated/tests/deprecated.rs rename to crates/tests/misc/deprecated/tests/deprecated.rs diff --git a/crates/tests/dispatch/Cargo.toml b/crates/tests/misc/dispatch/Cargo.toml similarity index 100% rename from crates/tests/dispatch/Cargo.toml rename to crates/tests/misc/dispatch/Cargo.toml diff --git a/crates/tests/dispatch/src/lib.rs b/crates/tests/misc/dispatch/src/lib.rs similarity index 100% rename from crates/tests/dispatch/src/lib.rs rename to crates/tests/misc/dispatch/src/lib.rs diff --git a/crates/tests/dispatch/tests/tests.rs b/crates/tests/misc/dispatch/tests/tests.rs similarity index 100% rename from crates/tests/dispatch/tests/tests.rs rename to crates/tests/misc/dispatch/tests/tests.rs diff --git a/crates/tests/does_not_return/Cargo.toml b/crates/tests/misc/does_not_return/Cargo.toml similarity index 100% rename from crates/tests/does_not_return/Cargo.toml rename to crates/tests/misc/does_not_return/Cargo.toml diff --git a/crates/tests/does_not_return/src/lib.rs b/crates/tests/misc/does_not_return/src/lib.rs similarity index 100% rename from crates/tests/does_not_return/src/lib.rs rename to crates/tests/misc/does_not_return/src/lib.rs diff --git a/crates/tests/does_not_return/tests/sys.rs b/crates/tests/misc/does_not_return/tests/sys.rs similarity index 100% rename from crates/tests/does_not_return/tests/sys.rs rename to crates/tests/misc/does_not_return/tests/sys.rs diff --git a/crates/tests/does_not_return/tests/win.rs b/crates/tests/misc/does_not_return/tests/win.rs similarity index 100% rename from crates/tests/does_not_return/tests/win.rs rename to crates/tests/misc/does_not_return/tests/win.rs diff --git a/crates/tests/enums/Cargo.toml b/crates/tests/misc/enums/Cargo.toml similarity index 100% rename from crates/tests/enums/Cargo.toml rename to crates/tests/misc/enums/Cargo.toml diff --git a/crates/tests/enums/src/lib.rs b/crates/tests/misc/enums/src/lib.rs similarity index 100% rename from crates/tests/enums/src/lib.rs rename to crates/tests/misc/enums/src/lib.rs diff --git a/crates/tests/enums/tests/sys.rs b/crates/tests/misc/enums/tests/sys.rs similarity index 100% rename from crates/tests/enums/tests/sys.rs rename to crates/tests/misc/enums/tests/sys.rs diff --git a/crates/tests/enums/tests/win.rs b/crates/tests/misc/enums/tests/win.rs similarity index 100% rename from crates/tests/enums/tests/win.rs rename to crates/tests/misc/enums/tests/win.rs diff --git a/crates/tests/error/Cargo.toml b/crates/tests/misc/error/Cargo.toml similarity index 100% rename from crates/tests/error/Cargo.toml rename to crates/tests/misc/error/Cargo.toml diff --git a/crates/tests/error/src/lib.rs b/crates/tests/misc/error/src/lib.rs similarity index 100% rename from crates/tests/error/src/lib.rs rename to crates/tests/misc/error/src/lib.rs diff --git a/crates/tests/error/tests/std.rs b/crates/tests/misc/error/tests/std.rs similarity index 100% rename from crates/tests/error/tests/std.rs rename to crates/tests/misc/error/tests/std.rs diff --git a/crates/tests/error/tests/test.rs b/crates/tests/misc/error/tests/test.rs similarity index 100% rename from crates/tests/error/tests/test.rs rename to crates/tests/misc/error/tests/test.rs diff --git a/crates/tests/error/tests/trim.rs b/crates/tests/misc/error/tests/trim.rs similarity index 100% rename from crates/tests/error/tests/trim.rs rename to crates/tests/misc/error/tests/trim.rs diff --git a/crates/tests/event/Cargo.toml b/crates/tests/misc/event/Cargo.toml similarity index 100% rename from crates/tests/event/Cargo.toml rename to crates/tests/misc/event/Cargo.toml diff --git a/crates/tests/event/src/lib.rs b/crates/tests/misc/event/src/lib.rs similarity index 100% rename from crates/tests/event/src/lib.rs rename to crates/tests/misc/event/src/lib.rs diff --git a/crates/tests/event/tests/tests.rs b/crates/tests/misc/event/tests/tests.rs similarity index 100% rename from crates/tests/event/tests/tests.rs rename to crates/tests/misc/event/tests/tests.rs diff --git a/crates/tests/extensions/Cargo.toml b/crates/tests/misc/extensions/Cargo.toml similarity index 100% rename from crates/tests/extensions/Cargo.toml rename to crates/tests/misc/extensions/Cargo.toml diff --git a/crates/tests/extensions/src/lib.rs b/crates/tests/misc/extensions/src/lib.rs similarity index 100% rename from crates/tests/extensions/src/lib.rs rename to crates/tests/misc/extensions/src/lib.rs diff --git a/crates/tests/extensions/tests/bool32.rs b/crates/tests/misc/extensions/tests/bool32.rs similarity index 100% rename from crates/tests/extensions/tests/bool32.rs rename to crates/tests/misc/extensions/tests/bool32.rs diff --git a/crates/tests/extensions/tests/boolean.rs b/crates/tests/misc/extensions/tests/boolean.rs similarity index 100% rename from crates/tests/extensions/tests/boolean.rs rename to crates/tests/misc/extensions/tests/boolean.rs diff --git a/crates/tests/extensions/tests/ntstatus.rs b/crates/tests/misc/extensions/tests/ntstatus.rs similarity index 100% rename from crates/tests/extensions/tests/ntstatus.rs rename to crates/tests/misc/extensions/tests/ntstatus.rs diff --git a/crates/tests/extensions/tests/variant_bool.rs b/crates/tests/misc/extensions/tests/variant_bool.rs similarity index 100% rename from crates/tests/extensions/tests/variant_bool.rs rename to crates/tests/misc/extensions/tests/variant_bool.rs diff --git a/crates/tests/handles/Cargo.toml b/crates/tests/misc/handles/Cargo.toml similarity index 100% rename from crates/tests/handles/Cargo.toml rename to crates/tests/misc/handles/Cargo.toml diff --git a/crates/tests/handles/src/lib.rs b/crates/tests/misc/handles/src/lib.rs similarity index 100% rename from crates/tests/handles/src/lib.rs rename to crates/tests/misc/handles/src/lib.rs diff --git a/crates/tests/handles/tests/legacy.rs b/crates/tests/misc/handles/tests/legacy.rs similarity index 100% rename from crates/tests/handles/tests/legacy.rs rename to crates/tests/misc/handles/tests/legacy.rs diff --git a/crates/tests/handles/tests/sys.rs b/crates/tests/misc/handles/tests/sys.rs similarity index 100% rename from crates/tests/handles/tests/sys.rs rename to crates/tests/misc/handles/tests/sys.rs diff --git a/crates/tests/handles/tests/win.rs b/crates/tests/misc/handles/tests/win.rs similarity index 100% rename from crates/tests/handles/tests/win.rs rename to crates/tests/misc/handles/tests/win.rs diff --git a/crates/tests/helpers/Cargo.toml b/crates/tests/misc/helpers/Cargo.toml similarity index 100% rename from crates/tests/helpers/Cargo.toml rename to crates/tests/misc/helpers/Cargo.toml diff --git a/crates/tests/helpers/src/lib.rs b/crates/tests/misc/helpers/src/lib.rs similarity index 100% rename from crates/tests/helpers/src/lib.rs rename to crates/tests/misc/helpers/src/lib.rs diff --git a/crates/tests/implement/Cargo.toml b/crates/tests/misc/implement/Cargo.toml similarity index 100% rename from crates/tests/implement/Cargo.toml rename to crates/tests/misc/implement/Cargo.toml diff --git a/crates/tests/implement/src/lib.rs b/crates/tests/misc/implement/src/lib.rs similarity index 100% rename from crates/tests/implement/src/lib.rs rename to crates/tests/misc/implement/src/lib.rs diff --git a/crates/tests/implement/tests/as_interface_param.rs b/crates/tests/misc/implement/tests/as_interface_param.rs similarity index 100% rename from crates/tests/implement/tests/as_interface_param.rs rename to crates/tests/misc/implement/tests/as_interface_param.rs diff --git a/crates/tests/implement/tests/buffer.rs b/crates/tests/misc/implement/tests/buffer.rs similarity index 100% rename from crates/tests/implement/tests/buffer.rs rename to crates/tests/misc/implement/tests/buffer.rs diff --git a/crates/tests/implement/tests/class_factory.rs b/crates/tests/misc/implement/tests/class_factory.rs similarity index 100% rename from crates/tests/implement/tests/class_factory.rs rename to crates/tests/misc/implement/tests/class_factory.rs diff --git a/crates/tests/implement/tests/com.rs b/crates/tests/misc/implement/tests/com.rs similarity index 100% rename from crates/tests/implement/tests/com.rs rename to crates/tests/misc/implement/tests/com.rs diff --git a/crates/tests/implement/tests/com_chain.rs b/crates/tests/misc/implement/tests/com_chain.rs similarity index 100% rename from crates/tests/implement/tests/com_chain.rs rename to crates/tests/misc/implement/tests/com_chain.rs diff --git a/crates/tests/implement/tests/data_object.rs b/crates/tests/misc/implement/tests/data_object.rs similarity index 100% rename from crates/tests/implement/tests/data_object.rs rename to crates/tests/misc/implement/tests/data_object.rs diff --git a/crates/tests/implement/tests/drop_target.rs b/crates/tests/misc/implement/tests/drop_target.rs similarity index 100% rename from crates/tests/implement/tests/drop_target.rs rename to crates/tests/misc/implement/tests/drop_target.rs diff --git a/crates/tests/implement/tests/dual.rs b/crates/tests/misc/implement/tests/dual.rs similarity index 100% rename from crates/tests/implement/tests/dual.rs rename to crates/tests/misc/implement/tests/dual.rs diff --git a/crates/tests/implement/tests/error.rs b/crates/tests/misc/implement/tests/error.rs similarity index 100% rename from crates/tests/implement/tests/error.rs rename to crates/tests/misc/implement/tests/error.rs diff --git a/crates/tests/implement/tests/from_raw_borrowed.rs b/crates/tests/misc/implement/tests/from_raw_borrowed.rs similarity index 100% rename from crates/tests/implement/tests/from_raw_borrowed.rs rename to crates/tests/misc/implement/tests/from_raw_borrowed.rs diff --git a/crates/tests/implement/tests/from_raw_borrowed_winrt.rs b/crates/tests/misc/implement/tests/from_raw_borrowed_winrt.rs similarity index 100% rename from crates/tests/implement/tests/from_raw_borrowed_winrt.rs rename to crates/tests/misc/implement/tests/from_raw_borrowed_winrt.rs diff --git a/crates/tests/implement/tests/generic_default.rs b/crates/tests/misc/implement/tests/generic_default.rs similarity index 100% rename from crates/tests/implement/tests/generic_default.rs rename to crates/tests/misc/implement/tests/generic_default.rs diff --git a/crates/tests/implement/tests/generic_generic.rs b/crates/tests/misc/implement/tests/generic_generic.rs similarity index 100% rename from crates/tests/implement/tests/generic_generic.rs rename to crates/tests/misc/implement/tests/generic_generic.rs diff --git a/crates/tests/implement/tests/generic_primitive.rs b/crates/tests/misc/implement/tests/generic_primitive.rs similarity index 100% rename from crates/tests/implement/tests/generic_primitive.rs rename to crates/tests/misc/implement/tests/generic_primitive.rs diff --git a/crates/tests/implement/tests/generic_stringable.rs b/crates/tests/misc/implement/tests/generic_stringable.rs similarity index 100% rename from crates/tests/implement/tests/generic_stringable.rs rename to crates/tests/misc/implement/tests/generic_stringable.rs diff --git a/crates/tests/implement/tests/identity.rs b/crates/tests/misc/implement/tests/identity.rs similarity index 100% rename from crates/tests/implement/tests/identity.rs rename to crates/tests/misc/implement/tests/identity.rs diff --git a/crates/tests/implement/tests/identity_from.rs b/crates/tests/misc/implement/tests/identity_from.rs similarity index 100% rename from crates/tests/implement/tests/identity_from.rs rename to crates/tests/misc/implement/tests/identity_from.rs diff --git a/crates/tests/implement/tests/into_impl.rs b/crates/tests/misc/implement/tests/into_impl.rs similarity index 100% rename from crates/tests/implement/tests/into_impl.rs rename to crates/tests/misc/implement/tests/into_impl.rs diff --git a/crates/tests/implement/tests/map.rs b/crates/tests/misc/implement/tests/map.rs similarity index 100% rename from crates/tests/implement/tests/map.rs rename to crates/tests/misc/implement/tests/map.rs diff --git a/crates/tests/implement/tests/no_std.rs b/crates/tests/misc/implement/tests/no_std.rs similarity index 100% rename from crates/tests/implement/tests/no_std.rs rename to crates/tests/misc/implement/tests/no_std.rs diff --git a/crates/tests/implement/tests/properties.rs b/crates/tests/misc/implement/tests/properties.rs similarity index 100% rename from crates/tests/implement/tests/properties.rs rename to crates/tests/misc/implement/tests/properties.rs diff --git a/crates/tests/implement/tests/query.rs b/crates/tests/misc/implement/tests/query.rs similarity index 100% rename from crates/tests/implement/tests/query.rs rename to crates/tests/misc/implement/tests/query.rs diff --git a/crates/tests/implement/tests/trust_level.rs b/crates/tests/misc/implement/tests/trust_level.rs similarity index 100% rename from crates/tests/implement/tests/trust_level.rs rename to crates/tests/misc/implement/tests/trust_level.rs diff --git a/crates/tests/implement/tests/vector.rs b/crates/tests/misc/implement/tests/vector.rs similarity index 100% rename from crates/tests/implement/tests/vector.rs rename to crates/tests/misc/implement/tests/vector.rs diff --git a/crates/tests/implement_core/Cargo.toml b/crates/tests/misc/implement_core/Cargo.toml similarity index 100% rename from crates/tests/implement_core/Cargo.toml rename to crates/tests/misc/implement_core/Cargo.toml diff --git a/crates/tests/implement_core/src/com_chain.rs b/crates/tests/misc/implement_core/src/com_chain.rs similarity index 100% rename from crates/tests/implement_core/src/com_chain.rs rename to crates/tests/misc/implement_core/src/com_chain.rs diff --git a/crates/tests/implement_core/src/com_object.rs b/crates/tests/misc/implement_core/src/com_object.rs similarity index 100% rename from crates/tests/implement_core/src/com_object.rs rename to crates/tests/misc/implement_core/src/com_object.rs diff --git a/crates/tests/implement_core/src/lib.rs b/crates/tests/misc/implement_core/src/lib.rs similarity index 100% rename from crates/tests/implement_core/src/lib.rs rename to crates/tests/misc/implement_core/src/lib.rs diff --git a/crates/tests/implement_core/src/static_com_object.rs b/crates/tests/misc/implement_core/src/static_com_object.rs similarity index 100% rename from crates/tests/implement_core/src/static_com_object.rs rename to crates/tests/misc/implement_core/src/static_com_object.rs diff --git a/crates/tests/interface/Cargo.toml b/crates/tests/misc/interface/Cargo.toml similarity index 100% rename from crates/tests/interface/Cargo.toml rename to crates/tests/misc/interface/Cargo.toml diff --git a/crates/tests/interface/src/lib.rs b/crates/tests/misc/interface/src/lib.rs similarity index 100% rename from crates/tests/interface/src/lib.rs rename to crates/tests/misc/interface/src/lib.rs diff --git a/crates/tests/interface/tests/com.rs b/crates/tests/misc/interface/tests/com.rs similarity index 100% rename from crates/tests/interface/tests/com.rs rename to crates/tests/misc/interface/tests/com.rs diff --git a/crates/tests/interface/tests/com_from_existing.rs b/crates/tests/misc/interface/tests/com_from_existing.rs similarity index 100% rename from crates/tests/interface/tests/com_from_existing.rs rename to crates/tests/misc/interface/tests/com_from_existing.rs diff --git a/crates/tests/interface/tests/no_std.rs b/crates/tests/misc/interface/tests/no_std.rs similarity index 100% rename from crates/tests/interface/tests/no_std.rs rename to crates/tests/misc/interface/tests/no_std.rs diff --git a/crates/tests/interface/tests/no_use.rs b/crates/tests/misc/interface/tests/no_use.rs similarity index 100% rename from crates/tests/interface/tests/no_use.rs rename to crates/tests/misc/interface/tests/no_use.rs diff --git a/crates/tests/interface/tests/non_com_existing.rs b/crates/tests/misc/interface/tests/non_com_existing.rs similarity index 100% rename from crates/tests/interface/tests/non_com_existing.rs rename to crates/tests/misc/interface/tests/non_com_existing.rs diff --git a/crates/tests/interface/tests/non_com_new.rs b/crates/tests/misc/interface/tests/non_com_new.rs similarity index 100% rename from crates/tests/interface/tests/non_com_new.rs rename to crates/tests/misc/interface/tests/non_com_new.rs diff --git a/crates/tests/interface_core/Cargo.toml b/crates/tests/misc/interface_core/Cargo.toml similarity index 100% rename from crates/tests/interface_core/Cargo.toml rename to crates/tests/misc/interface_core/Cargo.toml diff --git a/crates/tests/interface_core/src/lib.rs b/crates/tests/misc/interface_core/src/lib.rs similarity index 100% rename from crates/tests/interface_core/src/lib.rs rename to crates/tests/misc/interface_core/src/lib.rs diff --git a/crates/tests/interface_core/tests/asterisk_use.rs b/crates/tests/misc/interface_core/tests/asterisk_use.rs similarity index 100% rename from crates/tests/interface_core/tests/asterisk_use.rs rename to crates/tests/misc/interface_core/tests/asterisk_use.rs diff --git a/crates/tests/interface_core/tests/deref.rs b/crates/tests/misc/interface_core/tests/deref.rs similarity index 100% rename from crates/tests/interface_core/tests/deref.rs rename to crates/tests/misc/interface_core/tests/deref.rs diff --git a/crates/tests/interface_core/tests/no_use.rs b/crates/tests/misc/interface_core/tests/no_use.rs similarity index 100% rename from crates/tests/interface_core/tests/no_use.rs rename to crates/tests/misc/interface_core/tests/no_use.rs diff --git a/crates/tests/interface_core/tests/ref.rs b/crates/tests/misc/interface_core/tests/ref.rs similarity index 100% rename from crates/tests/interface_core/tests/ref.rs rename to crates/tests/misc/interface_core/tests/ref.rs diff --git a/crates/tests/interface_core/tests/ref_ok.rs b/crates/tests/misc/interface_core/tests/ref_ok.rs similarity index 100% rename from crates/tests/interface_core/tests/ref_ok.rs rename to crates/tests/misc/interface_core/tests/ref_ok.rs diff --git a/crates/tests/interface_core/tests/result.rs b/crates/tests/misc/interface_core/tests/result.rs similarity index 100% rename from crates/tests/interface_core/tests/result.rs rename to crates/tests/misc/interface_core/tests/result.rs diff --git a/crates/tests/interop/Cargo.toml b/crates/tests/misc/interop/Cargo.toml similarity index 100% rename from crates/tests/interop/Cargo.toml rename to crates/tests/misc/interop/Cargo.toml diff --git a/crates/tests/interop/src/lib.rs b/crates/tests/misc/interop/src/lib.rs similarity index 100% rename from crates/tests/interop/src/lib.rs rename to crates/tests/misc/interop/src/lib.rs diff --git a/crates/tests/interop/tests/activate_instance.rs b/crates/tests/misc/interop/tests/activate_instance.rs similarity index 100% rename from crates/tests/interop/tests/activate_instance.rs rename to crates/tests/misc/interop/tests/activate_instance.rs diff --git a/crates/tests/lib/Cargo.toml b/crates/tests/misc/lib/Cargo.toml similarity index 100% rename from crates/tests/lib/Cargo.toml rename to crates/tests/misc/lib/Cargo.toml diff --git a/crates/tests/lib/src/lib.rs b/crates/tests/misc/lib/src/lib.rs similarity index 100% rename from crates/tests/lib/src/lib.rs rename to crates/tests/misc/lib/src/lib.rs diff --git a/crates/tests/lib/tests/sys.rs b/crates/tests/misc/lib/tests/sys.rs similarity index 100% rename from crates/tests/lib/tests/sys.rs rename to crates/tests/misc/lib/tests/sys.rs diff --git a/crates/tests/lib/tests/win.rs b/crates/tests/misc/lib/tests/win.rs similarity index 94% rename from crates/tests/lib/tests/win.rs rename to crates/tests/misc/lib/tests/win.rs index 844dabbd91..eae4b30218 100644 --- a/crates/tests/lib/tests/win.rs +++ b/crates/tests/misc/lib/tests/win.rs @@ -43,7 +43,7 @@ fn clr() -> Result<()> { let mut version = vec![0; 20]; let mut len = 0; GetFileVersion( - w!("../../libs/bindgen/default/Windows.winmd"), + w!("../../../libs/bindgen/default/Windows.winmd"), Some(&mut version), &mut len, )?; diff --git a/crates/tests/linux/Cargo.toml b/crates/tests/misc/linux/Cargo.toml similarity index 100% rename from crates/tests/linux/Cargo.toml rename to crates/tests/misc/linux/Cargo.toml diff --git a/crates/tests/linux/src/lib.rs b/crates/tests/misc/linux/src/lib.rs similarity index 100% rename from crates/tests/linux/src/lib.rs rename to crates/tests/misc/linux/src/lib.rs diff --git a/crates/tests/linux/tests/core.rs b/crates/tests/misc/linux/tests/core.rs similarity index 100% rename from crates/tests/linux/tests/core.rs rename to crates/tests/misc/linux/tests/core.rs diff --git a/crates/tests/linux/tests/result.rs b/crates/tests/misc/linux/tests/result.rs similarity index 100% rename from crates/tests/linux/tests/result.rs rename to crates/tests/misc/linux/tests/result.rs diff --git a/crates/tests/literals/Cargo.toml b/crates/tests/misc/literals/Cargo.toml similarity index 100% rename from crates/tests/literals/Cargo.toml rename to crates/tests/misc/literals/Cargo.toml diff --git a/crates/tests/literals/src/lib.rs b/crates/tests/misc/literals/src/lib.rs similarity index 100% rename from crates/tests/literals/src/lib.rs rename to crates/tests/misc/literals/src/lib.rs diff --git a/crates/tests/literals/tests/sys.rs b/crates/tests/misc/literals/tests/sys.rs similarity index 100% rename from crates/tests/literals/tests/sys.rs rename to crates/tests/misc/literals/tests/sys.rs diff --git a/crates/tests/literals/tests/win.rs b/crates/tests/misc/literals/tests/win.rs similarity index 100% rename from crates/tests/literals/tests/win.rs rename to crates/tests/misc/literals/tests/win.rs diff --git a/crates/tests/match/Cargo.toml b/crates/tests/misc/match/Cargo.toml similarity index 100% rename from crates/tests/match/Cargo.toml rename to crates/tests/misc/match/Cargo.toml diff --git a/crates/tests/match/src/lib.rs b/crates/tests/misc/match/src/lib.rs similarity index 100% rename from crates/tests/match/src/lib.rs rename to crates/tests/misc/match/src/lib.rs diff --git a/crates/tests/match/tests/tests.rs b/crates/tests/misc/match/tests/tests.rs similarity index 100% rename from crates/tests/match/tests/tests.rs rename to crates/tests/misc/match/tests/tests.rs diff --git a/crates/tests/matrix3x2/Cargo.toml b/crates/tests/misc/matrix3x2/Cargo.toml similarity index 100% rename from crates/tests/matrix3x2/Cargo.toml rename to crates/tests/misc/matrix3x2/Cargo.toml diff --git a/crates/tests/matrix3x2/src/lib.rs b/crates/tests/misc/matrix3x2/src/lib.rs similarity index 100% rename from crates/tests/matrix3x2/src/lib.rs rename to crates/tests/misc/matrix3x2/src/lib.rs diff --git a/crates/tests/matrix3x2/tests/matrix3x2.rs b/crates/tests/misc/matrix3x2/tests/matrix3x2.rs similarity index 100% rename from crates/tests/matrix3x2/tests/matrix3x2.rs rename to crates/tests/misc/matrix3x2/tests/matrix3x2.rs diff --git a/crates/tests/metadata/Cargo.toml b/crates/tests/misc/metadata/Cargo.toml similarity index 89% rename from crates/tests/metadata/Cargo.toml rename to crates/tests/misc/metadata/Cargo.toml index 44ffd25b5d..d2b124e1cd 100644 --- a/crates/tests/metadata/Cargo.toml +++ b/crates/tests/misc/metadata/Cargo.toml @@ -25,5 +25,5 @@ features = [ "Win32_System_SystemServices", ] -[dependencies.tool_lib] -path = "../../tools/lib" +[dependencies.helpers] +workspace = true \ No newline at end of file diff --git a/crates/tests/metadata/src/lib.rs b/crates/tests/misc/metadata/src/lib.rs similarity index 100% rename from crates/tests/metadata/src/lib.rs rename to crates/tests/misc/metadata/src/lib.rs diff --git a/crates/tests/metadata/tests/attribute_enum.rs b/crates/tests/misc/metadata/tests/attribute_enum.rs similarity index 96% rename from crates/tests/metadata/tests/attribute_enum.rs rename to crates/tests/misc/metadata/tests/attribute_enum.rs index bde1630c5a..202f5dca2f 100644 --- a/crates/tests/metadata/tests/attribute_enum.rs +++ b/crates/tests/misc/metadata/tests/attribute_enum.rs @@ -2,7 +2,7 @@ use windows_metadata::*; #[test] fn attribute_enum() { - let files = tool_lib::default_metadata(); + let files = helpers::default_metadata(); let reader = Reader::new(files); let (method, _) = reader diff --git a/crates/tests/metadata/tests/fn_call_size.rs b/crates/tests/misc/metadata/tests/fn_call_size.rs similarity index 99% rename from crates/tests/metadata/tests/fn_call_size.rs rename to crates/tests/misc/metadata/tests/fn_call_size.rs index b67262fa3b..a05fc65fb4 100644 --- a/crates/tests/metadata/tests/fn_call_size.rs +++ b/crates/tests/misc/metadata/tests/fn_call_size.rs @@ -5,7 +5,7 @@ fn size() { // Note: you can double check these export names from a Visual Studio x86 command prompt as follows: // dumpbin /exports kernel32.lib | findstr /i RtmConvertIpv6AddressAndLengthToNetAddress - let files = tool_lib::default_metadata(); + let files = helpers::default_metadata(); let reader = Reader::new(files); assert_eq!( diff --git a/crates/tests/metadata/tests/struct_size.rs b/crates/tests/misc/metadata/tests/struct_size.rs similarity index 100% rename from crates/tests/metadata/tests/struct_size.rs rename to crates/tests/misc/metadata/tests/struct_size.rs diff --git a/crates/tests/metadata/tests/unused.rs b/crates/tests/misc/metadata/tests/unused.rs similarity index 89% rename from crates/tests/metadata/tests/unused.rs rename to crates/tests/misc/metadata/tests/unused.rs index f2f2665277..bbce6e6f8a 100644 --- a/crates/tests/metadata/tests/unused.rs +++ b/crates/tests/misc/metadata/tests/unused.rs @@ -2,7 +2,7 @@ use windows_metadata::*; #[test] fn test() { - let files = tool_lib::default_metadata(); + let files = helpers::default_metadata(); let reader = Reader::filter( files, &["Windows", "BadNamespace", "Windows.AI"], diff --git a/crates/tests/msrv/Cargo.toml b/crates/tests/misc/msrv/Cargo.toml similarity index 100% rename from crates/tests/msrv/Cargo.toml rename to crates/tests/misc/msrv/Cargo.toml diff --git a/crates/tests/msrv/src/lib.rs b/crates/tests/misc/msrv/src/lib.rs similarity index 100% rename from crates/tests/msrv/src/lib.rs rename to crates/tests/misc/msrv/src/lib.rs diff --git a/crates/tests/no_std/Cargo.toml b/crates/tests/misc/no_std/Cargo.toml similarity index 73% rename from crates/tests/no_std/Cargo.toml rename to crates/tests/misc/no_std/Cargo.toml index 6481d54566..5181b6649c 100644 --- a/crates/tests/no_std/Cargo.toml +++ b/crates/tests/misc/no_std/Cargo.toml @@ -8,34 +8,34 @@ doc = false doctest = false [dependencies.windows-core] -path = "../../libs/core" +path = "../../../libs/core" default-features = false [dependencies.windows-registry] -path = "../../libs/registry" +path = "../../../libs/registry" default-features = false [dependencies.windows-result] -path = "../../libs/result" +path = "../../../libs/result" default-features = false [dependencies.windows-strings] -path = "../../libs/strings" +path = "../../../libs/strings" default-features = false [dependencies.windows-sys] -path = "../../libs/sys" +path = "../../../libs/sys" default-features = false [dependencies.windows-targets] workspace = true [dependencies.windows-version] -path = "../../libs/version" +path = "../../../libs/version" default-features = false [dependencies.windows] -path = "../../libs/windows" +path = "../../../libs/windows" default-features = false features = ["implement"] diff --git a/crates/tests/no_std/src/lib.rs b/crates/tests/misc/no_std/src/lib.rs similarity index 100% rename from crates/tests/no_std/src/lib.rs rename to crates/tests/misc/no_std/src/lib.rs diff --git a/crates/tests/no_use/Cargo.toml b/crates/tests/misc/no_use/Cargo.toml similarity index 100% rename from crates/tests/no_use/Cargo.toml rename to crates/tests/misc/no_use/Cargo.toml diff --git a/crates/tests/no_use/src/lib.rs b/crates/tests/misc/no_use/src/lib.rs similarity index 100% rename from crates/tests/no_use/src/lib.rs rename to crates/tests/misc/no_use/src/lib.rs diff --git a/crates/tests/no_use/tests/test.rs b/crates/tests/misc/no_use/tests/test.rs similarity index 100% rename from crates/tests/no_use/tests/test.rs rename to crates/tests/misc/no_use/tests/test.rs diff --git a/crates/tests/noexcept/Cargo.toml b/crates/tests/misc/noexcept/Cargo.toml similarity index 100% rename from crates/tests/noexcept/Cargo.toml rename to crates/tests/misc/noexcept/Cargo.toml diff --git a/crates/tests/noexcept/build.rs b/crates/tests/misc/noexcept/build.rs similarity index 100% rename from crates/tests/noexcept/build.rs rename to crates/tests/misc/noexcept/build.rs diff --git a/crates/tests/noexcept/src/bindings.rs b/crates/tests/misc/noexcept/src/bindings.rs similarity index 100% rename from crates/tests/noexcept/src/bindings.rs rename to crates/tests/misc/noexcept/src/bindings.rs diff --git a/crates/tests/noexcept/src/interop.cpp b/crates/tests/misc/noexcept/src/interop.cpp similarity index 100% rename from crates/tests/noexcept/src/interop.cpp rename to crates/tests/misc/noexcept/src/interop.cpp diff --git a/crates/tests/noexcept/src/lib.rs b/crates/tests/misc/noexcept/src/lib.rs similarity index 100% rename from crates/tests/noexcept/src/lib.rs rename to crates/tests/misc/noexcept/src/lib.rs diff --git a/crates/tests/noexcept/src/test.idl b/crates/tests/misc/noexcept/src/test.idl similarity index 100% rename from crates/tests/noexcept/src/test.idl rename to crates/tests/misc/noexcept/src/test.idl diff --git a/crates/tests/noexcept/tests/test.rs b/crates/tests/misc/noexcept/tests/test.rs similarity index 100% rename from crates/tests/noexcept/tests/test.rs rename to crates/tests/misc/noexcept/tests/test.rs diff --git a/crates/tests/not_dll/Cargo.toml b/crates/tests/misc/not_dll/Cargo.toml similarity index 100% rename from crates/tests/not_dll/Cargo.toml rename to crates/tests/misc/not_dll/Cargo.toml diff --git a/crates/tests/not_dll/src/lib.rs b/crates/tests/misc/not_dll/src/lib.rs similarity index 100% rename from crates/tests/not_dll/src/lib.rs rename to crates/tests/misc/not_dll/src/lib.rs diff --git a/crates/tests/not_dll/tests/sys.rs b/crates/tests/misc/not_dll/tests/sys.rs similarity index 100% rename from crates/tests/not_dll/tests/sys.rs rename to crates/tests/misc/not_dll/tests/sys.rs diff --git a/crates/tests/not_dll/tests/win.rs b/crates/tests/misc/not_dll/tests/win.rs similarity index 100% rename from crates/tests/not_dll/tests/win.rs rename to crates/tests/misc/not_dll/tests/win.rs diff --git a/crates/tests/query_signature/Cargo.toml b/crates/tests/misc/query_signature/Cargo.toml similarity index 100% rename from crates/tests/query_signature/Cargo.toml rename to crates/tests/misc/query_signature/Cargo.toml diff --git a/crates/tests/query_signature/src/lib.rs b/crates/tests/misc/query_signature/src/lib.rs similarity index 100% rename from crates/tests/query_signature/src/lib.rs rename to crates/tests/misc/query_signature/src/lib.rs diff --git a/crates/tests/query_signature/tests/test.rs b/crates/tests/misc/query_signature/tests/test.rs similarity index 100% rename from crates/tests/query_signature/tests/test.rs rename to crates/tests/misc/query_signature/tests/test.rs diff --git a/crates/tests/readme/Cargo.toml b/crates/tests/misc/readme/Cargo.toml similarity index 100% rename from crates/tests/readme/Cargo.toml rename to crates/tests/misc/readme/Cargo.toml diff --git a/crates/tests/misc/readme/src/lib.rs b/crates/tests/misc/readme/src/lib.rs new file mode 100644 index 0000000000..8726376a56 --- /dev/null +++ b/crates/tests/misc/readme/src/lib.rs @@ -0,0 +1,10 @@ +#![doc = include_str!("../../../../libs/core/readme.md")] +#![doc = include_str!("../../../../libs/cppwinrt/readme.md")] +#![doc = include_str!("../../../../libs/metadata/readme.md")] +#![doc = include_str!("../../../../libs/registry/readme.md")] +#![doc = include_str!("../../../../libs/result/readme.md")] +#![doc = include_str!("../../../../libs/strings/readme.md")] +#![doc = include_str!("../../../../libs/sys/readme.md")] +#![doc = include_str!("../../../../libs/targets/readme.md")] +#![doc = include_str!("../../../../libs/version/readme.md")] +#![doc = include_str!("../../../../libs/windows/readme.md")] diff --git a/crates/tests/registry/Cargo.toml b/crates/tests/misc/registry/Cargo.toml similarity index 100% rename from crates/tests/registry/Cargo.toml rename to crates/tests/misc/registry/Cargo.toml diff --git a/crates/tests/registry/src/lib.rs b/crates/tests/misc/registry/src/lib.rs similarity index 100% rename from crates/tests/registry/src/lib.rs rename to crates/tests/misc/registry/src/lib.rs diff --git a/crates/tests/registry/tests/bad_string.rs b/crates/tests/misc/registry/tests/bad_string.rs similarity index 100% rename from crates/tests/registry/tests/bad_string.rs rename to crates/tests/misc/registry/tests/bad_string.rs diff --git a/crates/tests/registry/tests/bytes.rs b/crates/tests/misc/registry/tests/bytes.rs similarity index 100% rename from crates/tests/registry/tests/bytes.rs rename to crates/tests/misc/registry/tests/bytes.rs diff --git a/crates/tests/registry/tests/hstring.rs b/crates/tests/misc/registry/tests/hstring.rs similarity index 100% rename from crates/tests/registry/tests/hstring.rs rename to crates/tests/misc/registry/tests/hstring.rs diff --git a/crates/tests/registry/tests/interop.rs b/crates/tests/misc/registry/tests/interop.rs similarity index 100% rename from crates/tests/registry/tests/interop.rs rename to crates/tests/misc/registry/tests/interop.rs diff --git a/crates/tests/registry/tests/keys.rs b/crates/tests/misc/registry/tests/keys.rs similarity index 100% rename from crates/tests/registry/tests/keys.rs rename to crates/tests/misc/registry/tests/keys.rs diff --git a/crates/tests/registry/tests/raw.rs b/crates/tests/misc/registry/tests/raw.rs similarity index 100% rename from crates/tests/registry/tests/raw.rs rename to crates/tests/misc/registry/tests/raw.rs diff --git a/crates/tests/registry/tests/string.rs b/crates/tests/misc/registry/tests/string.rs similarity index 100% rename from crates/tests/registry/tests/string.rs rename to crates/tests/misc/registry/tests/string.rs diff --git a/crates/tests/registry/tests/u32.rs b/crates/tests/misc/registry/tests/u32.rs similarity index 100% rename from crates/tests/registry/tests/u32.rs rename to crates/tests/misc/registry/tests/u32.rs diff --git a/crates/tests/registry/tests/u64.rs b/crates/tests/misc/registry/tests/u64.rs similarity index 100% rename from crates/tests/registry/tests/u64.rs rename to crates/tests/misc/registry/tests/u64.rs diff --git a/crates/tests/registry/tests/value.rs b/crates/tests/misc/registry/tests/value.rs similarity index 100% rename from crates/tests/registry/tests/value.rs rename to crates/tests/misc/registry/tests/value.rs diff --git a/crates/tests/registry/tests/values.rs b/crates/tests/misc/registry/tests/values.rs similarity index 100% rename from crates/tests/registry/tests/values.rs rename to crates/tests/misc/registry/tests/values.rs diff --git a/crates/tests/registry_default/Cargo.toml b/crates/tests/misc/registry_default/Cargo.toml similarity index 100% rename from crates/tests/registry_default/Cargo.toml rename to crates/tests/misc/registry_default/Cargo.toml diff --git a/crates/tests/registry_default/src/lib.rs b/crates/tests/misc/registry_default/src/lib.rs similarity index 100% rename from crates/tests/registry_default/src/lib.rs rename to crates/tests/misc/registry_default/src/lib.rs diff --git a/crates/tests/registry_default/tests/test.rs b/crates/tests/misc/registry_default/tests/test.rs similarity index 100% rename from crates/tests/registry_default/tests/test.rs rename to crates/tests/misc/registry_default/tests/test.rs diff --git a/crates/tests/reserved/Cargo.toml b/crates/tests/misc/reserved/Cargo.toml similarity index 100% rename from crates/tests/reserved/Cargo.toml rename to crates/tests/misc/reserved/Cargo.toml diff --git a/crates/tests/reserved/src/lib.rs b/crates/tests/misc/reserved/src/lib.rs similarity index 100% rename from crates/tests/reserved/src/lib.rs rename to crates/tests/misc/reserved/src/lib.rs diff --git a/crates/tests/reserved/tests/sys.rs b/crates/tests/misc/reserved/tests/sys.rs similarity index 100% rename from crates/tests/reserved/tests/sys.rs rename to crates/tests/misc/reserved/tests/sys.rs diff --git a/crates/tests/reserved/tests/win.rs b/crates/tests/misc/reserved/tests/win.rs similarity index 100% rename from crates/tests/reserved/tests/win.rs rename to crates/tests/misc/reserved/tests/win.rs diff --git a/crates/tests/resources/Cargo.toml b/crates/tests/misc/resources/Cargo.toml similarity index 100% rename from crates/tests/resources/Cargo.toml rename to crates/tests/misc/resources/Cargo.toml diff --git a/crates/tests/resources/src/lib.rs b/crates/tests/misc/resources/src/lib.rs similarity index 100% rename from crates/tests/resources/src/lib.rs rename to crates/tests/misc/resources/src/lib.rs diff --git a/crates/tests/resources/tests/sys.rs b/crates/tests/misc/resources/tests/sys.rs similarity index 100% rename from crates/tests/resources/tests/sys.rs rename to crates/tests/misc/resources/tests/sys.rs diff --git a/crates/tests/resources/tests/win.rs b/crates/tests/misc/resources/tests/win.rs similarity index 100% rename from crates/tests/resources/tests/win.rs rename to crates/tests/misc/resources/tests/win.rs diff --git a/crates/tests/result/Cargo.toml b/crates/tests/misc/result/Cargo.toml similarity index 100% rename from crates/tests/result/Cargo.toml rename to crates/tests/misc/result/Cargo.toml diff --git a/crates/tests/result/src/lib.rs b/crates/tests/misc/result/src/lib.rs similarity index 100% rename from crates/tests/result/src/lib.rs rename to crates/tests/misc/result/src/lib.rs diff --git a/crates/tests/result/tests/error.rs b/crates/tests/misc/result/tests/error.rs similarity index 100% rename from crates/tests/result/tests/error.rs rename to crates/tests/misc/result/tests/error.rs diff --git a/crates/tests/result/tests/hresult.rs b/crates/tests/misc/result/tests/hresult.rs similarity index 100% rename from crates/tests/result/tests/hresult.rs rename to crates/tests/misc/result/tests/hresult.rs diff --git a/crates/tests/result/tests/slim_errors.rs b/crates/tests/misc/result/tests/slim_errors.rs similarity index 100% rename from crates/tests/result/tests/slim_errors.rs rename to crates/tests/misc/result/tests/slim_errors.rs diff --git a/crates/tests/return_handle/Cargo.toml b/crates/tests/misc/return_handle/Cargo.toml similarity index 100% rename from crates/tests/return_handle/Cargo.toml rename to crates/tests/misc/return_handle/Cargo.toml diff --git a/crates/tests/return_handle/src/lib.rs b/crates/tests/misc/return_handle/src/lib.rs similarity index 100% rename from crates/tests/return_handle/src/lib.rs rename to crates/tests/misc/return_handle/src/lib.rs diff --git a/crates/tests/return_handle/tests/win.rs b/crates/tests/misc/return_handle/tests/win.rs similarity index 100% rename from crates/tests/return_handle/tests/win.rs rename to crates/tests/misc/return_handle/tests/win.rs diff --git a/crates/tests/return_struct/Cargo.toml b/crates/tests/misc/return_struct/Cargo.toml similarity index 100% rename from crates/tests/return_struct/Cargo.toml rename to crates/tests/misc/return_struct/Cargo.toml diff --git a/crates/tests/return_struct/src/lib.rs b/crates/tests/misc/return_struct/src/lib.rs similarity index 100% rename from crates/tests/return_struct/src/lib.rs rename to crates/tests/misc/return_struct/src/lib.rs diff --git a/crates/tests/return_struct/tests/win.rs b/crates/tests/misc/return_struct/tests/win.rs similarity index 100% rename from crates/tests/return_struct/tests/win.rs rename to crates/tests/misc/return_struct/tests/win.rs diff --git a/crates/tests/riddle/Cargo.toml b/crates/tests/misc/riddle/Cargo.toml similarity index 84% rename from crates/tests/riddle/Cargo.toml rename to crates/tests/misc/riddle/Cargo.toml index 039fce0a26..393683c2fe 100644 --- a/crates/tests/riddle/Cargo.toml +++ b/crates/tests/misc/riddle/Cargo.toml @@ -14,8 +14,8 @@ workspace = true [dependencies.windows-metadata] workspace = true -[dependencies.tool_lib] -path = "../../tools/lib" +[dependencies.helpers] +workspace = true [dependencies.windows-bindgen] workspace = true diff --git a/crates/tests/riddle/src/composition.rs b/crates/tests/misc/riddle/src/composition.rs similarity index 100% rename from crates/tests/riddle/src/composition.rs rename to crates/tests/misc/riddle/src/composition.rs diff --git a/crates/tests/riddle/src/generic_interfaces.rs b/crates/tests/misc/riddle/src/generic_interfaces.rs similarity index 100% rename from crates/tests/riddle/src/generic_interfaces.rs rename to crates/tests/misc/riddle/src/generic_interfaces.rs diff --git a/crates/tests/riddle/src/lib.rs b/crates/tests/misc/riddle/src/lib.rs similarity index 98% rename from crates/tests/riddle/src/lib.rs rename to crates/tests/misc/riddle/src/lib.rs index 05dc9a1647..3b95c6e762 100644 --- a/crates/tests/riddle/src/lib.rs +++ b/crates/tests/misc/riddle/src/lib.rs @@ -64,7 +64,7 @@ pub fn run_riddle(name: &str, dialect: &str, etc: &[&str]) -> Vec, + functions: &BTreeMap, platform: &str, ) { println!("{library}"); @@ -94,7 +94,7 @@ EXPORTS for (function, calling_convention) in functions { match calling_convention { - lib::CallingConvention::Stdcall(params) if platform.starts_with("i686_gnu") => def + helpers::CallingConvention::Stdcall(params) if platform.starts_with("i686_gnu") => def .write_all(format!("{function}@{params} @ 0\n").as_bytes()) .unwrap(), _ => def @@ -168,7 +168,7 @@ EXPORTS fn build_mri( output: &std::path::Path, ar: &str, - libraries: &BTreeMap>, + libraries: &BTreeMap>, ) { let mri_path = output.join("unified.mri"); let mut mri = std::fs::File::create(&mri_path).unwrap(); diff --git a/crates/tools/msvc/Cargo.toml b/crates/tools/msvc/Cargo.toml index a3412b4145..bdf3b37e7a 100644 --- a/crates/tools/msvc/Cargo.toml +++ b/crates/tools/msvc/Cargo.toml @@ -4,5 +4,5 @@ version = "0.52.0" edition = "2021" publish = false -[dependencies] -lib = { package = "tool_lib", path = "../lib" } +[dependencies.helpers] +workspace = true diff --git a/crates/tools/msvc/src/main.rs b/crates/tools/msvc/src/main.rs index a3a7d8e8a6..e0910429bf 100644 --- a/crates/tools/msvc/src/main.rs +++ b/crates/tools/msvc/src/main.rs @@ -19,7 +19,7 @@ fn main() { return; }; - let libraries = lib::libraries(); + let libraries = helpers::libraries(); let output = std::path::PathBuf::from("crates/targets/baseline"); _ = std::fs::remove_dir_all(&output); std::fs::create_dir_all(&output).unwrap(); @@ -71,7 +71,7 @@ changes can sneak in undetected. fn build_library( output: &std::path::Path, library: &str, - functions: &BTreeMap, + functions: &BTreeMap, ) { // Note that we don't use set_extension as it confuses PathBuf when the library name includes a period. @@ -96,7 +96,7 @@ EXPORTS for (function, calling_convention) in functions { let buffer = match calling_convention { - lib::CallingConvention::Stdcall(size) => { + helpers::CallingConvention::Stdcall(size) => { let mut buffer = format!("void __stdcall {function}("); for param in 0..(*size / 4) { @@ -111,7 +111,7 @@ EXPORTS buffer.push_str(") {}\n"); buffer } - lib::CallingConvention::Cdecl => { + helpers::CallingConvention::Cdecl => { format!("void __cdecl {function}() {{}}\n") } }; diff --git a/crates/tools/standalone/src/main.rs b/crates/tools/standalone/src/main.rs index 5873865a6c..1676ea1b80 100644 --- a/crates/tools/standalone/src/main.rs +++ b/crates/tools/standalone/src/main.rs @@ -3,12 +3,12 @@ use std::path::Path; fn main() { - if !Path::new("crates/tests/standalone/Cargo.toml").exists() { + if !Path::new("crates/tests/misc/standalone/Cargo.toml").exists() { println!("This tool must be run from the root of the repo."); std::process::exit(1); } - let src = Path::new("crates/tests/standalone/src"); + let src = Path::new("crates/tests/misc/standalone/src"); write_sys( &src.join("b_none.rs"), diff --git a/crates/tools/yml/Cargo.toml b/crates/tools/yml/Cargo.toml index 9acfd94035..13e874c1ee 100644 --- a/crates/tools/yml/Cargo.toml +++ b/crates/tools/yml/Cargo.toml @@ -4,5 +4,5 @@ version = "0.0.0" edition = "2021" publish = false -[dependencies] -lib = { package = "tool_lib", path = "../lib" } +[dependencies.helpers] +workspace = true diff --git a/crates/tools/yml/src/main.rs b/crates/tools/yml/src/main.rs index 912477c3ec..5245f8cbb9 100644 --- a/crates/tools/yml/src/main.rs +++ b/crates/tools/yml/src/main.rs @@ -65,7 +65,7 @@ jobs: // This unrolling is required since "cargo test --all" consumes too much memory for the GitHub hosted runners // and the occasional "cargo clean" is required to avoid running out of disk space in the same runners. - for (count, (name, _)) in lib::crates("crates").iter().enumerate() { + for (count, (name, _)) in helpers::crates("crates").iter().enumerate() { if count % 50 == 0 { write!( &mut yml, @@ -136,7 +136,7 @@ jobs: // This unrolling is required since "cargo clippy --all" consumes too much memory for the GitHub hosted runners. - for (name, _) in lib::crates("crates") { + for (name, _) in helpers::crates("crates") { write!( &mut yml, r" @@ -181,7 +181,7 @@ jobs: uses: ./.github/actions/fix-environment" .to_string(); - for (name, _) in lib::crates("crates/libs") { + for (name, _) in helpers::crates("crates/libs") { write!( &mut yml, r"