feat(gateway,cli): windows compilation support - #2496
Conversation
|
All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO document and I hereby sign the DCO. |
1 similar comment
|
I have read the DCO document and I hereby sign the DCO. |
|
/ok to test d0bcaca |
|
I have read the DCO document and I hereby sign the DCO. |
d0bcaca to
6d0f148
Compare
|
/ok to test 15c622a |
|
/ok to test 7c96e78 |
|
/ok to test 7c96e78 |
|
/ok to test 923ecf0 |
|
/ok to test c1d5e98 |
|
/ok to test d1fa290 |
1 similar comment
|
/ok to test d1fa290 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
/ok to test 60c2340 |
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
…ove build logic Signed-off-by: Akber Raza <akberr@nvidia.com>
…re-specific subdirectories Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
…ation and scripts Signed-off-by: Akber Raza <akberr@nvidia.com>
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>
…est exclusion list Signed-off-by: Akber Raza <akberr@nvidia.com> # Conflicts: # tasks/scripts/windows-msvc.ps1
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>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
Signed-off-by: Akber Raza <akberr@nvidia.com>
602d192 to
97ce1f3
Compare
| #![allow(clippy::result_large_err)] | ||
|
|
||
| #[cfg(not(target_os = "windows"))] | ||
| include!("lib.rs"); | ||
|
|
||
| #[cfg(target_os = "windows")] | ||
| include!("lib_win.rs"); |
There was a problem hiding this comment.
Note
I'm moving the original comment here, since the "root" comments don't support threads.
One question came up while reviewing this - was having driver crates conditional in the server crate, rather than rely on stubs for each driver considered?
I did a quick spike here and I think this should work, but don't have a windows machine to check: araza008/OpenShell@windows_compilation...NVIDIA:OpenShell:spike/windows-exclude-unsupported-drivers
This way driver crates don't need any conditions, they are just excluded from the build process. There are some guard required in the server crate itself, but that seems a bit less intrusive than condition + a stub for all driver crates.
There was a problem hiding this comment.
I see. Could you please share more detail? Where would hundreds of macros come from in that case? That would only be required in the openshell-server, wherever we deal with drivers, which could then be isolated to a separate module and the cfg macro could be applied to that one only.
I updated the spike to do that: araza008/OpenShell@windows_compilation...NVIDIA:OpenShell:spike/windows-exclude-unsupported-drivers and I built that successfully on a Windows machine.
| thiserror = { workspace = true } | ||
| anyhow = { workspace = true } | ||
| hmac = "0.12" | ||
| sha2 = { workspace = true } | ||
| hex = "0.4" | ||
|
|
There was a problem hiding this comment.
These dependencies appear to be stale.
Looks like these were removed when the supervisor functionality was split into the core, network, and process crates in #1650.
| /// Run the prover end-to-end and return a result containing an exit code. | ||
| /// Run the prover end-to-end and return an exit code. | ||
| /// | ||
| /// - `Ok(0)` — pass (no findings, or all accepted) | ||
| /// - `Ok(1)` — fail (one or more unaccepted findings present) | ||
| /// - `Err(_)` — input or registry loading error | ||
| /// - `0` — pass (no critical/high findings, or all accepted) | ||
| /// - `1` — fail (critical or high findings present) | ||
| /// - `2` — input error |
There was a problem hiding this comment.
This is unrelated to this PR, please revert.
| - uses: actions/checkout@v4 | ||
| - uses: jdx/mise-action@v3 |
There was a problem hiding this comment.
Please update this to use SHA-pinned actions.
For jdx/mise-action currently approved ones are:
jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8,
jdx/mise-action@ca0c5fc9c8a8386dae8ba5d37608a083a307991c,
jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d,
| - uses: actions/checkout@v4 | |
| - uses: jdx/mise-action@v3 | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0 |
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: x86_64-pc-windows-msvc |
There was a problem hiding this comment.
We should match the toolchain version that we use in other places. Also, the @master version is on the approved list.
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-msvc | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.95.0" | |
| targets: x86_64-pc-windows-msvc |
As per their docs:
When passing an explicit toolchain as an input instead of
@rev, you'll want to use "dtolnay/rust-toolchain@master" as the revision of the action.
| - uses: actions/checkout@v4 | ||
| - uses: jdx/mise-action@v3 |
| @@ -0,0 +1,6 @@ | |||
| // SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
There was a problem hiding this comment.
Similar to drivers, I think the sandbox build should be excluded from the build graph on windows, rather than having stubs for windows. This way we could eliminate the need for cfg macros in crates we don't need for windows anyways (this includes the sandbox and vfio.
Spike with this approach: araza008/OpenShell@windows_compilation...NVIDIA:OpenShell:spike/windows-exclude-unsupported-runtime-crates
|
/ok to test 97ce1f3 |
Summary
compile the OpenShell gateway and CLI natively on Windows MSVC for x86-64 and arm64. It is build support only. It does not add functional Windows support for MXC, the sandbox supervisor, or Windows services.
Related Issue
Changes
adds windows mise tasks
supports bundled-z3 with optional system z3
gates unix-only dependencies so the geteway and cli compile on windows
adds linting and pre-commit tasks
Testing
mise run --skip-tools windows:build:x64
mise run --skip-tools windows:build:arm64
Checklist