You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 054b3a6
Browse filesBrowse the repository at this point in the historyBrowse files
build(windows): default to static CRT and pinned Z3 packages (#5654)
Use the static CRT for all four Windows executables and link Z3 into the gateway.
Reuse the pinned Z3 5.1.0 /MT libraries from GHCR on x64 and ARM64. Build from source when explicitly requested or when the package is unavailable.
Closes#5653
Signed-off-by: shailendras <shailendras@nvidia.com>
Copy file name to clipboardExpand all lines: .agents/skills/build-openshell-mxc-windows/SKILL.md
+42-11Lines changed: 42 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,8 @@ The Windows build lane is implemented by these tracked files:
104
104
|`tasks/rust.toml`, `tasks/test.toml`, and `tasks/markdown.toml`| Windows routing for compiler-bearing checks, explicit Unix-only test skips, and Markdown dependency setup. |
105
105
|`tasks/scripts/windows-msvc.ps1`| PowerShell wrapper that enters the Visual Studio developer environment and invokes Cargo. |
106
106
|`.github/workflows/windows-msvc.yml`| Opt-in PR lint and test plus advisory `windows` branch cache seeding and dependent binary builds on native x64 and ARM64 runners. |
|`.agents/skills/build-openshell-mxc-windows/`| This skill and companion reference material. |
108
110
109
111
Use the code that is already in the repo. Do not generate a parallel Windows
@@ -203,9 +205,12 @@ from this skill.
203
205
|`OPENSHELL_MXC_SKIP_ARM64`|`0`| Set to `1` to skip ARM64 when using `all` tasks. |
204
206
|`OPENSHELL_WINDOWS_BUILD_JOBS`|`CARGO_BUILD_JOBS`, then `4`| Positive Cargo job limit used by the wrapper. |
205
207
|`CARGO_TARGET_DIR`|`target` under repo root | Override Cargo output location. Use a short absolute path when x64-to-ARM64 builds approach Windows path-length limits. |
206
-
|`Z3_LIBRARY_PATH_OVERRIDE`| unset | Directory containing target-compatible system `libz3.lib` and `libz3.dll`, used instead of the prebuilt download. |
208
+
|`OPENSHELL_WINDOWS_STATIC_RUNTIME`|`1`| Static CRT/Z3 by default; reuse the pinned GHCR `/MT` package. Set `0` only for legacy shared builds. |
|`Z3_SRC_SOURCE_DIR`| unset | Local Z3 5.1.0 source tree; selects source when no library override is supplied. |
211
+
|`Z3_LIBRARY_PATH_OVERRIDE`| unset | Directory containing a target-compatible static `/MT``libz3.lib`; legacy shared overrides apply only in explicit shared mode. |
207
212
|`Z3_SYS_Z3_HEADER`| unset | Full `z3.h` path required with a system Z3 library. |
208
-
|`Z3_SYS_Z3_VERSION`|`5.1.0`|Pinned official prebuilt Z3 release selected by the wrapper. |
213
+
|`Z3_SYS_Z3_VERSION`|`5.1.0`|Solver version pinned with source and package digests in `tasks/windows-z3.json`. |
209
214
|`READ_ONLY_GITHUB_TOKEN`| unset | Optional token for the Z3 release lookup; GitHub Actions supplies `github.token`. |
210
215
|`RUSTC_WRAPPER`| inherited | The wrapper resolves an available command to an absolute path. If it is unavailable, the wrapper warns and continues without compiler caching. |
211
216
@@ -304,7 +309,7 @@ jobs in the current mirror push run, or push a new mirrored commit. The binaries
304
309
The ARM64 check/build steps in this x64-host contract are cross-builds. The
305
310
wrapper discovers and adds host-native LLVM and Ninja to `PATH`, requires the
306
311
ARM64 compiler and Spectre-mitigated libraries, lets ARM64 crypto crates select
307
-
`clang-cl`, and downloads the official prebuilt ARM64 Z3 package.
312
+
`clang-cl`, and downloads the pinned static ARM64 Z3 package from GHCR.
308
313
309
314
On ARM64 hosts, validate the native ARM64 check, build, and test path. The
310
315
wrapper rejects test targets that do not match the host architecture, so x64
@@ -423,14 +428,11 @@ architecture through Windows system configuration (not an emulated SSH shell),
423
428
caches uploads by SHA256, and runs the unchanged real E2E harness. Results and
424
429
host probes return to `target/windows-remote-results`, including nonzero test
425
430
outcomes. The remote host needs SSH, OpenSSL, and MXC, not a compiler toolchain.
426
-
Package the matching `libz3.dll` from the target-specific Cargo cache alongside
427
-
the gateway: Windows prebuilt Z3 uses an import library, not static linkage.
428
-
The `windows:build:*` tasks now stage the pinned DLL, check PE architecture,
429
-
reject conflicting cache hashes, and verify the copied hash. Local MXC E2E
430
-
requires the adjacent DLL and reports a preflight error if it is missing.
431
-
Use `-Z3DllPath` when discovery is ambiguous. The native Visual C++ runtime
432
-
must be present on the remote host. Verify DLL architecture and the gateway
433
-
loader before E2E; do not count missing-DLL crashes as MXC enforcement failures.
431
+
Default builds embed Z3 and the CRT. The remote helper reads gateway imports
432
+
and includes the matching `libz3.dll` only for shared builds. `-Z3DllPath`
433
+
continues to select a shared DLL when discovery is ambiguous; those builds
434
+
also need the native Visual C++ runtime. Check gateway startup before E2E;
435
+
do not count loader failures as MXC enforcement failures.
434
436
Verify the SSH host key beforehand. Never send the private SSH key or bundle
435
437
the harness signing-key directories. `-SkipBuild` is an explicit stale-artifact
436
438
opt-in, not evidence that artifacts match current sources. See the MXC driver
@@ -591,3 +593,32 @@ ETW qualification. Build native release binaries first and set
591
593
membership and leaves a results bundle under the target directory. Ordinary MXC
592
594
E2E success does not establish ETW audit coverage. Coverage must use structured
593
595
JSONL and fail when an expected event is absent or has the wrong OCSF class.
596
+
597
+
## Static Windows ZIP packages
598
+
599
+
Windows tasks and CI embed the CRT and Z3 by default. The wrapper loads
600
+
`.cargo/windows-static.toml` and downloads the matching static `/MT` package
601
+
from `ghcr.io/nvidia/openshell/z3`. `tasks/windows-z3.json` pins Z3 5.1.0,
602
+
the source checksum, and each target's OCI, archive, and build-manifest digests.
603
+
Native PowerShell performs HTTPS downloads without Docker, ORAS, or GitHub
604
+
credentials. `.cache/windows-z3` is cached separately from Rust outputs.
605
+
606
+
Source compilation occurs only when the package is unavailable or explicitly
0 commit comments