Skip to content

Commit 2f96c53

Browse files
araza008shailendra-nvgburachasjamieknvidiapimlock
authored
feat(gateway,cli): windows compilation support (#2496)
* chore(windows): gate Unix-only workspace code for MSVC Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * feat(windows): stub unsupported compute drivers Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * ci(windows): add MSVC mise build lane Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * docs(windows): document MSVC build-only design Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * docs(agent): add Windows MSVC build skill Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * feat(windows): add Windows build support Signed-off-by: Akber Raza <akberr@nvidia.com> * refactor(windows): consolidate Windows-specific dependencies and improve build logic Signed-off-by: Akber Raza <akberr@nvidia.com> * feat(windows): add libclang path resolution and update cargo commands with bundled Z3 features Signed-off-by: Akber Raza <akberr@nvidia.com> * chore(tooling): lock Windows tool artifacts Signed-off-by: Giedrius Burachas <gburachas@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * feat(windows): enhance libclang path resolution to support architecture-specific subdirectories Signed-off-by: Akber Raza <akberr@nvidia.com> * Fix Windows dependency gating after sync merge Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(z3): update Z3 header path requirements in Windows build documentation and scripts Signed-off-by: Akber Raza <akberr@nvidia.com> * docs(windows): relocate Windows MSVC build design to architecture/ Why: windows-msvc-build-design.mdx is a design document ("design decisions for the native Windows MSVC build lane"), but it lived in the published, user-facing docs/reference/ tree. Per AGENTS.md (Documentation) and architecture/README.md ("rfc/ vs architecture/"), design content belongs in architecture/ (or rfc/), not in published reference. It also shared Fern sidebar "position: 6" with the MXC compute-driver design page, colliding in the Reference nav ordering. What: - Move docs/reference/windows-msvc-build-design.mdx -> architecture/windows-msvc-build.md. - Strip the Fern publish frontmatter and add a plain H1, matching the other architecture docs. - Register it in the architecture doc index in architecture/README.md. - Repoint the inbound references (build-openshell-mxc-windows skill + reference, implement-openshell-mxc-driver skill) to the new path. With both design pages moved out of docs/reference/, the duplicate position-6 sidebar collision is resolved. Signed-off-by: Akber Raza <akberr@nvidia.com> * remove openshell-supervisor-network from unsupported driver package test exclusion list Signed-off-by: Akber Raza <akberr@nvidia.com> # Conflicts: # tasks/scripts/windows-msvc.ps1 * fix(interceptors): gate unix-only imports so the crate builds on Windows openshell-gateway-interceptors failed to compile on Windows (E0432: no UnixStream in tokio::net), breaking any Windows build of openshell-server (which depends on it unconditionally). The connect_unix_endpoint fn was already #[cfg(unix)]-gated, but the imports it uses (UnixStream, TokioIo, Uri, service_fn) were left ungated. Gate those four imports with #[cfg(unix)] too. No behavior change on unix; Windows now compiles (no errors, no unused-import warnings). Signed-off-by: Akber Raza <akberr@nvidia.com> * feat(windows): add native ARM64 test support Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(mise): skip Skaffold on Windows Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): harden ARM64 toolchain discovery Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): scope ARM64 toolchain preflight Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): restore compatibility after GitHub sync Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): avoid rate-limited Z3 source lookup Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(mise): skip Helm checks on Windows Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): support repository pre-commit checks Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): stabilize native MSVC validation Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): harden shared Z3 source cache Signed-off-by: Shailendra Singh <shailendras@nvidia.com> * fix(windows): avoid leaking MSVC flags into clang-cl Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): complete ARM64 migration audit Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): restore ARM64 Ninja discovery Signed-off-by: Akber Raza <akberr@nvidia.com> * refactor(windows): separate platform crate roots Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): restore proto include cfg gating Signed-off-by: Akber Raza <akberr@nvidia.com> * refactor: address lint errors * fix(windows): add preflight check for proxy auth file path * docs(windows): update GitHub checkout guidance Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): restore CI after dependency updates Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(mise): repair Windows sccache lock entry Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(windows): reconcile validation after rebase Signed-off-by: Akber Raza <akberr@nvidia.com> * refactor(server): exclude unsupported drivers on Windows Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * refactor(server): isolate platform driver config Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> * fix(windows): repair unsupported driver contract test Signed-off-by: Akber Raza <akberr@nvidia.com> * fix(sandbox): remove stale dependencies Signed-off-by: Akber Raza <akberr@nvidia.com> * ci(windows): pin x64 workflow actions Signed-off-by: Akber Raza <akberr@nvidia.com> * ci(windows): align x64 Rust toolchain Signed-off-by: Akber Raza <akberr@nvidia.com> * ci(windows): align ARM64 workflow setup Signed-off-by: Akber Raza <akberr@nvidia.com> * refactor(windows): exclude unsupported runtime crates Signed-off-by: Akber Raza <akberr@nvidia.com> * refactor(windows): exclude unsupported crates at workspace boundary Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * refactor(server): gate builtin driver config by platform Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * fix(sandbox): restore crate documentation Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * ci(windows): make build workflow manual Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * ci(windows): temporarily enable pull request builds Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * ci(windows): cache Rust dependencies Signed-off-by: Akber Raza <akberr@nvidia.com> * refactor(windows): remove unnecessary platform changes Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * ci(windows): make build workflow manual Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * fix(ci): synchronize mise lockfile Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * fix(ci): normalize mise provenance metadata Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * refactor(python): isolate Windows atomic replace retry Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> * fix(python): type Windows permission test errors Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> --------- Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com> Signed-off-by: Giedrius Burachas <gburachas@nvidia.com> Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com> Signed-off-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com> Co-authored-by: Shailendra Singh <shailendras@nvidia.com> Co-authored-by: Giedrius Burachas <gburachas@nvidia.com> Co-authored-by: Jamie King <jamiek@nvidia.com> Co-authored-by: Piotr Mlocek <pmlocek@nvidia.com> Co-authored-by: Piotr Mlocek <1116309+pimlock@users.noreply.github.com>
1 parent 0310cbe commit 2f96c53

45 files changed

Lines changed: 2544 additions & 441 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/build-openshell-mxc-windows/SKILL.md‎

Lines changed: 341 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
# Reference: Windows MSVC maintenance lane
2+
3+
Companion to [SKILL.md](SKILL.md). Use this file for quick lookup while
4+
maintaining the existing build-only Windows MSVC lane.
5+
6+
## Lane Files
7+
8+
| File | Purpose |
9+
|---|---|
10+
| `tasks/windows.toml` | Mise task definitions for `windows:*`. |
11+
| `tasks/scripts/windows-msvc.ps1` | Visual Studio environment discovery, rustup target setup, Cargo invocation, logs, artifact report. |
12+
| `.github/workflows/windows-msvc.yml` | Manual GitHub Actions x64 job and disabled ARM64 scaffold, each with an architecture-specific Rust dependency cache. |
13+
| `architecture/windows-msvc-build.md` | Human-readable design contract. |
14+
15+
## Commands
16+
17+
Use `--skip-tools` for all Windows mise tasks:
18+
19+
```powershell
20+
mise run --skip-tools windows:check:x64
21+
mise run --skip-tools windows:check:arm64
22+
mise run --skip-tools windows:build:x64
23+
mise run --skip-tools windows:build:arm64
24+
mise run --skip-tools windows:test:x64
25+
mise run --skip-tools windows:test:arm64
26+
mise run --skip-tools windows:test:unsupported:x64
27+
mise run --skip-tools windows:test:unsupported:arm64
28+
mise run --skip-tools windows:ci
29+
```
30+
31+
For host-native full validation, detect architecture first:
32+
33+
```powershell
34+
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
35+
if ($arch -eq [System.Runtime.InteropServices.Architecture]::Arm64) {
36+
mise run --skip-tools windows:check:arm64
37+
mise run --skip-tools windows:build:arm64
38+
mise run --skip-tools windows:test:arm64
39+
mise run --skip-tools windows:test:unsupported:arm64
40+
mise run --skip-tools windows:artifacts
41+
} else {
42+
mise run --skip-tools windows:ci
43+
}
44+
```
45+
46+
The native test tasks reject a target that does not match the host architecture.
47+
Do not report x64 compatibility-under-emulation coverage from an ARM64 run.
48+
49+
The wrapper adds missing rustup targets and clears inherited
50+
`RUSTC_WRAPPER`. It does not install Visual Studio, Rust, Docker, Kubernetes,
51+
Podman, WSL, Hyper-V, or VM tooling.
52+
53+
On Windows, `mise run pre-commit` routes `rust:check`, `rust:lint`, and
54+
`test:rust` through this wrapper for the host-native target. The shared task
55+
definitions retain their existing Unix commands. Only tests for Linux glibc
56+
installer behavior, Linux build-environment shell helpers, and Linux
57+
service/RPM packaging assets skip on Windows. The Windows Clippy command
58+
excludes unsupported runtime packages as top-level targets and allows only
59+
unused imports, dead code, and unused async functions caused by cfg-gated
60+
Windows stubs; other warnings remain errors.
61+
62+
The wrapper limits Cargo to four jobs by default and serializes wrapper-owned
63+
Cargo commands with a host-local mutex. It does not set `CL` or `_CL_` because
64+
`clang-cl` also consumes them and can parse a global `/MP4` option as an input
65+
file.
66+
67+
For ARM64, verify the Visual Studio instance contains the ARM64 MSVC tools,
68+
ARM64 Spectre-mitigated libraries, Clang tools, CMake tools, and a Windows SDK.
69+
Clang supplies host-native `libclang.dll` for `bindgen` and `clang-cl.exe` for
70+
ARM64 crypto dependencies such as `ring` and `aws-lc-sys`. Native ARM64 uses
71+
the normal bundled-Z3 CMake path. An x64-to-ARM64 check/build discovers and
72+
adds host-native Ninja to `PATH`, while the crypto crates select `clang-cl`.
73+
Bundled Z3 uses CMake's Visual Studio ARM64 generator with native MSVC `cl.exe`
74+
because `z3-sys 0.10.9` passes the MSBuild-only `-m` argument. Use a short
75+
`CARGO_TARGET_DIR` if Windows path-length limits are reached.
76+
77+
## Unsupported Driver Rules
78+
79+
Windows is a build target only. These runtimes remain unsupported:
80+
81+
- Docker
82+
- Kubernetes
83+
- Podman
84+
- VM
85+
86+
Rules:
87+
88+
- Keep config/library stubs where the gateway needs them.
89+
- Return clear unsupported errors at runtime.
90+
- Do not build standalone Windows driver binaries.
91+
- Do not add Docker Desktop, WSL, Hyper-V, Podman machine, Podman Desktop, or
92+
VM-backed execution as part of this skill.
93+
94+
Current focused unsupported-contract tests:
95+
96+
```text
97+
windows_builtin_compute_drivers_report_unsupported
98+
```
99+
100+
Run them with the architecture-specific focused task on the native host.
101+
102+
## Cargo Excludes
103+
104+
The Windows wrapper intentionally excludes unsupported runtime packages as
105+
top-level workspace targets for check/test:
106+
107+
```text
108+
--exclude openshell-driver-docker
109+
--exclude openshell-driver-kubernetes
110+
--exclude openshell-driver-kubernetes-secrets
111+
--exclude openshell-driver-podman
112+
--exclude openshell-driver-vault
113+
--exclude openshell-driver-vm
114+
--exclude openshell-sandbox
115+
--exclude openshell-supervisor-network
116+
--exclude openshell-supervisor-process
117+
--exclude openshell-vfio
118+
```
119+
120+
The gateway keeps platform configuration and unsupported-operation contracts
121+
without depending on the Docker, Kubernetes, Podman, sandbox supervisor,
122+
process supervisor, VM, or VFIO runtime crates. The Kubernetes Secrets and
123+
Vault libraries still compile as gateway dependencies; only their standalone
124+
Unix-socket binaries and package-level tests are excluded as top-level targets.
125+
126+
## Common Errors
127+
128+
### Unix imports leak into Windows builds
129+
130+
Symptoms:
131+
132+
```text
133+
unresolved import std::os::unix
134+
unresolved import tokio::net::UnixListener
135+
unresolved import nix::...
136+
```
137+
138+
Fix pattern:
139+
140+
```rust
141+
#[cfg(unix)]
142+
use tokio::net::{UnixListener, UnixStream};
143+
```
144+
145+
Move Unix-only functions into Unix-only modules, or add a Windows stub that
146+
returns an unsupported error.
147+
148+
### Linux-only dependency reaches Windows
149+
150+
Symptoms:
151+
152+
```text
153+
failed to run custom build command for libseccomp-sys
154+
pkg-config could not find libsecret
155+
```
156+
157+
Fix pattern:
158+
159+
```toml
160+
[target.'cfg(target_os = "linux")'.dependencies]
161+
libseccomp = "..."
162+
```
163+
164+
Only gate the dependency if no Windows path should use it.
165+
166+
### ARM64 check fails but x64 passes
167+
168+
Likely causes:
169+
170+
- Native dependency does not support `aarch64-pc-windows-msvc`.
171+
- ARM64 MSVC or Spectre-mitigated libraries are missing.
172+
- Host-native `clang-cl`, Ninja, or CMake is missing during an x64-to-ARM64 build.
173+
- `CL` or `_CL_` injects a global MSVC option such as `/MP4` into `clang-cl`.
174+
- Build script assumes x64 tools.
175+
- Inline assembly or prebuilt artifact lacks ARM64 handling.
176+
177+
Do not skip ARM64 silently. Either fix the target handling or report the exact
178+
blocked dependency.
179+
180+
### Focused tests report many filtered-out tests
181+
182+
This is expected for `windows:test:unsupported:x64`. Cargo runs one named test
183+
and filters the other `openshell-server` tests. Report these as filtered, not
184+
ignored.
185+
186+
## Reporting Counts
187+
188+
Use the log summaries from:
189+
190+
| Log | Count source |
191+
|---|---|
192+
| `test-x86_64-pc-windows-msvc.log` | Full x64 workspace test pass. |
193+
| `test-aarch64-pc-windows-msvc.log` | Full native ARM64 workspace test pass. |
194+
| `test-x86_64-pc-windows-msvc-unsupported-*.log` | Focused unsupported-contract re-runs and filtered counts. |
195+
| `test-aarch64-pc-windows-msvc-unsupported-*.log` | Focused native ARM64 re-runs and filtered counts. |
196+
197+
Separate:
198+
199+
- passed
200+
- failed
201+
- ignored
202+
- filtered out
203+
- cfg-gated zero-test targets
204+
- package-level excludes
205+
206+
Package-level excludes are not printed as ignored tests by Cargo.
207+
208+
## Final Sanity Checks
209+
210+
Before committing Windows-lane changes, choose checks based on the host
211+
architecture:
212+
213+
```powershell
214+
cargo fmt --all
215+
git diff --check
216+
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
217+
if ($arch -eq [System.Runtime.InteropServices.Architecture]::Arm64) {
218+
mise run --skip-tools windows:check:arm64
219+
mise run --skip-tools windows:build:arm64
220+
mise run --skip-tools windows:test:arm64
221+
mise run --skip-tools windows:test:unsupported:arm64
222+
} else {
223+
mise run --skip-tools windows:check:x64
224+
mise run --skip-tools windows:check:arm64
225+
mise run --skip-tools windows:test:unsupported:x64
226+
}
227+
```
228+
229+
Run the full x64-host `windows:ci` lane when build or test behavior changed and
230+
the host can run that lane natively.

‎.github/workflows/windows-msvc.yml‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Windows MSVC (build-only)
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
x64:
6+
runs-on: windows-2025
7+
steps:
8+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9+
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
10+
with:
11+
install: false
12+
experimental: true
13+
- uses: dtolnay/rust-toolchain@master
14+
with:
15+
toolchain: "1.95.0"
16+
targets: x86_64-pc-windows-msvc
17+
- name: Cache Rust target and registry
18+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
19+
with:
20+
shared-key: windows-msvc-x64
21+
cache-targets: "true"
22+
cache-on-failure: "true"
23+
cache-bin: "false"
24+
- run: mise run --skip-tools windows:check:x64
25+
- run: mise run --skip-tools windows:build:x64
26+
- run: mise run --skip-tools windows:test:x64
27+
- run: mise run --skip-tools windows:test:unsupported:x64
28+
arm64:
29+
# TODO: provision a windows-arm64 self-hosted runner
30+
runs-on: [self-hosted, windows-arm64]
31+
if: false # flip to true once the runner is online
32+
steps:
33+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34+
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
35+
with:
36+
install: false
37+
experimental: true
38+
- uses: dtolnay/rust-toolchain@master
39+
with:
40+
toolchain: "1.95.0"
41+
targets: aarch64-pc-windows-msvc
42+
- name: Cache Rust target and registry
43+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
44+
with:
45+
shared-key: windows-msvc-arm64
46+
cache-targets: "true"
47+
cache-on-failure: "true"
48+
cache-bin: "false"
49+
- run: mise run --skip-tools windows:check:arm64
50+
- run: mise run --skip-tools windows:build:arm64

‎CONTRIBUTING.md‎

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Skills live in `.agents/skills/`. Your agent's harness can discover and load the
8484
| Platform | `generate-sandbox-policy` | Generate YAML sandbox policies from requirements or API docs |
8585
| Platform | `helm-dev-environment` | Start and manage the local Kubernetes development environment |
8686
| Platform | `tui-development` | Development guide for the ratatui-based terminal UI |
87+
| Platform | `build-openshell-mxc-windows` | Maintain and validate the build-only x64 and ARM64 Windows MSVC lane |
8788
| Documentation | `update-docs` | Scan recent commits and draft doc updates for user-facing changes |
8889
| Maintenance | `sync-agent-infra` | Detect and fix drift across agent-first infrastructure files |
8990
| Reference | `sbom` | Generate SBOMs and resolve dependency licenses |
@@ -287,7 +288,6 @@ Project requirements:
287288
- Rust 1.90+
288289
- Python 3.11+
289290
- Docker (running)
290-
- Z3 solver library (for the policy prover crate)
291291

292292
### Optional: Bazel (experimental)
293293

@@ -307,28 +307,10 @@ Bazel builds Z3 from source, so no system Z3 installation is needed when using B
307307
echo "target" >> .bazelignore
308308
```
309309

310-
### macOS build tools
311-
312-
Install Apple Command Line Tools before building locally:
313-
314-
```bash
315-
xcode-select --install
316-
```
317-
318-
If Cargo fails while building `protobuf-src` with an error such as
319-
`fatal error: 'utility' file not found`, `fatal error: 'cstdlib' file not
320-
found`, or `A compiler with support for C++11 language features is required`,
321-
your Command Line Tools install may not expose the libc++ headers on the
322-
compiler's default include path. Reinstall Command Line Tools to correct the error:
323-
324-
```bash
325-
sudo rm -rf /Library/Developer/CommandLineTools
326-
xcode-select --install
327-
```
328-
329310
### Z3 installation
330311

331-
The `openshell-prover` crate links against the system Z3 library via pkg-config.
312+
The `openshell-prover` crate links against Z3. On macOS and Linux, install the
313+
system Z3 development package; `z3-sys` discovers it through `pkg-config`.
332314

333315
```bash
334316
# macOS
@@ -341,12 +323,46 @@ sudo apt install libz3-dev
341323
sudo dnf install z3-devel
342324
```
343325

344-
If you prefer not to install Z3 system-wide, you can compile it from source as a one-time step:
326+
If you prefer not to install Z3 system-wide, use the bundled Z3 feature. This
327+
compiles Z3 from source during the Rust build:
345328

346329
```bash
347330
cargo build -p openshell-prover --features bundled-z3
348331
```
349332

333+
For x86-64 Windows MSVC builds, use one of these Z3 paths:
334+
335+
- System Z3: point `Z3_LIBRARY_PATH_OVERRIDE` at the directory containing the
336+
64-bit MSVC Z3 library and `Z3_SYS_Z3_HEADER` at the full path to `z3.h`.
337+
The `windows:*` tasks use this path automatically when `Z3_LIBRARY_PATH_OVERRIDE`
338+
is set.
339+
- Bundled Z3: pass `--features bundled-z3` so `z3-sys` builds Z3 from source.
340+
341+
Both Windows paths still require `libclang.dll` for `bindgen`. If LLVM is not on
342+
the default search path, set `LIBCLANG_PATH` to the directory containing
343+
`libclang.dll`.
344+
345+
```powershell
346+
$env:LIBCLANG_PATH='C:\Program Files\Microsoft Visual Studio\2022\<Edition>\VC\Tools\Llvm\x64\bin'
347+
cargo build -p openshell-cli --target x86_64-pc-windows-msvc --features bundled-z3
348+
```
349+
350+
To use a local x64 Z3 release with the Windows task wrapper:
351+
352+
```powershell
353+
$env:Z3_LIBRARY_PATH_OVERRIDE='C:\path\to\z3-4.16.0-x64-win\bin'
354+
$env:Z3_SYS_Z3_HEADER='C:\path\to\z3-4.16.0-x64-win\include\z3.h'
355+
mise run --skip-tools windows:build:x64
356+
```
357+
358+
### macOS build tools
359+
360+
Install Apple Command Line Tools before building locally:
361+
362+
```bash
363+
xcode-select --install
364+
```
365+
350366
## Getting Started
351367

352368
```bash

0 commit comments

Comments
 (0)