feat(windivert-sys): refactor path handling with path_macro2 and improve build scripts - #26
Closed
YuniqueUnic wants to merge 2 commits into
Closed
YuniqueUnic wants to merge 2 commits into
YuniqueUnic wants to merge 2 commits into
Conversation
…ove build scripts - Replace hardcoded string paths with `path_macro2` macros for better cross-platform compatibility and maintainability. - Add `path_macro2` as a build dependency in Cargo.toml. - Introduce automatic git submodule initialization during static builds. - Improve file copying logic and sys file detection in build scripts. - Format Windows-specific paths using `path!` and `path_const!` macros consistently across gnu.rs and msvc.rs compilers. - Clean up object files properly after DLL compilation.
Author
|
The failing job encountered this error: update MSRV to 1.68 in check workflow Update the minimum supported Rust version to 1.68 in the GitHub Actions check workflow strategy:
fail-fast: false
matrix:
- msrv: [1.64]
+ msrv: [1.68]
steps:
- uses: actions/checkout@v4
with: |
Update the minimum supported Rust version to 1.68 in the GitHub Actions check workflow configuration file.
YuniqueUnic
force-pushed
the
fix/build-win-sys
branch
from
November 4, 2025 13:18
adebe55 to
4b6653a
Compare
Owner
|
I do appreciate the contribution, but the changes are not suitable for merging Cross compilation was already fixed by just replacing the backward slashes for fordward slashes, no need to add a dependency for something that was just a typo (and also resolvable using std) Submodule initialization:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses critical CI build failures and enhances path handling robustness for cross-platform compatibility. Below are the details of the issues encountered and the corresponding solutions implemented.
Issues Encountered in CI Build
vendorDirectory: Thevendordirectory (containing third-party dependencies) was absent in the target path during CI runs. This caused failures when thestaticfeature is enabled (requires dependency source/binary files from the vendor submodule).build.rsfailed to locate thevendor/dlldirectory. The root cause was a hardcoded Windows-style path string ("vendor\include"), which is incompatible with cross-platform build environments.Relevant modification measures:
path_macro2macros to improve cross-platform compatibility and maintainability.path_macro2as a build dependency inCargo.toml.path!andpath_const!macros to format paths in the compiler configurations (gnu.rs and msvc.rs), thereby generating path formats compatible with the respective systems.Could you please review this PR when you have time? Let me know if there are any adjustments needed for better compatibility or maintainability!