fix(windows): ensure memset_explicit symbol is properly exported for MinGW #119
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sarman/tftsr-devops_investigation#119
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/cargo-config-sodium"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
available in MinGW runtime
Automated PR Review (qwen3.5-122b-think via liteLLM):\n\n
Summary
The PR addresses a Windows MinGW build issue where
memset_explicitfrom libsodium-sys-stable isn't resolved. The changes add a C shim with proper export macros and compile it conditionally for Windows MinGW. However, there's a critical link order issue that could cause the fix to fail.Findings
[WARNING] src-tauri/build.rs:25 - Link order not guaranteed
Evidence:
println!("cargo:rustc-link-lib=static=memset_shim");Fix: The comment states "must be before libsodium in link order" but there's no mechanism to enforce this. Cargo doesn't guarantee link order with just
rustc-link-lib. Consider usingcargo:rustc-link-searchor restructuring the build to ensure memset_shim links before libsodium.[WARNING] src-tauri/memset_s_shim.c:15 - Inconsistent macro detection
Evidence:
#if defined(_WIN32) || defined(__WIN32__) || defined(__MINGW32__)Fix: The build.rs only defines
WIN32and__WIN32__, but the C file checks for__MINGW32__which isn't defined in build.rs. Either add.define("__MINGW32__", None)in build.rs or remove__MINGW32__from the C file's macro check.[SUGGESTION] src-tauri/memset_s_shim.c:1 - Naming inconsistency
Evidence: File is
memset_s_shim.cbut providesmemset_explicitFix: Consider renaming to
memset_explicit_shim.cfor clarity, though this is not functionally problematic.Verdict: APPROVE WITH COMMENTS