Skip to content

Windows packaging script (x64 and Arm64), and fix the Windows build of edge0-strata - #240

Closed
shuk777 wants to merge 2 commits into
mainfrom
feat/windows-package-script
Closed

shuk777 wants to merge 2 commits into
mainfrom
feat/windows-package-script

Conversation

@shuk777

@shuk777 shuk777 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

The Windows packages of Edge0 Chat (x64 and Arm64) were built by hand, step by step. This PR adds scripts/package/windows/package.ps1, the Windows counterpart of scripts/package/macos-arm64/package.sh, so that a Windows package is three commands:

.\scripts\package\windows\package.ps1 fetch  -Cache C:\edge0-cache -Commit <commit>
.\scripts\package\windows\package.ps1 build  -Cache C:\edge0-cache -Out C:\edge0-out -Commit <commit>
.\scripts\package\windows\package.ps1 verify -Zip C:\edge0-out\edge0-chat-<version>-windows-<arch>.zip [-Model DIR]
  • fetch downloads the pinned inputs (python.org embeddable Python 3.12.10 with SHA-256, llama.cpp 3cf0325, the wheels of edge0-strata/requirements.txt for the target platform, cargo vendor, the npm cache).
  • build clones the commit clean and builds offline: edge0-infer.exe (windows-vulkan preset, GGML_NATIVE=OFF, static CRT), strata.exe / strata_kq.dll (as edge0-strata/EDGE0.md describes, STRATA_PORTABLE=ON, fixed CUDA architectures) and Edge0 Chat.exe (tauri build --no-bundle, static CRT). It stages the package with the same layout as the 0.2.0 release, writes THIRD-PARTY-NOTICES.txt and the user README, checks modules, PE machine and build paths, and writes the zip and its .sha256.
  • verify extracts the zip and checks the layout, PE machine, build paths, edge0-infer info (source_modified: no), strata.exe --version, the bundled Python packages and server.py --help; with -Model it serves one prompt.

The two architectures differ only in a settings table at the top of the script:

x64 Arm64
C/C++ compiler MSVC clang-cl (with MSVC libraries and linker)
GGML CPU code AVX2, FMA, F16C armv8.2-a+dotprod+fp16+i8mm
CUDA architectures 75;86;89;120 121
Wheels / embeddable Python win_amd64 / amd64 win_arm64 / arm64

The script runs in the VS developer environment of the machine's CPU; -EnvScript loads a script first for toolchains installed outside the usual places. README.md in the folder lists the build machine requirements and every step; user-README.md is the README inside the package (one template, arch-specific paragraphs kept per arch). The user README also mentions the Downloads low-integrity issue we hit on the N1X machine (copy, not move, the zip out of Downloads).

It also fixes the Windows build of main (one change in edge0-strata): edge0-strata/src/program/generate.cpp called setenv, which Windows does not have (from 42f3769, #230), so strata.exe did not compile on Windows, x64 or Arm64. It now uses _putenv_s under _WIN32, as the other calls in that file and in nv_defaults.cpp / arch_defaults.cpp do; Linux and macOS keep setenv. A full -k 0 build of main on Windows Arm64 had this as its only failing file (169 of 170 objects compiled).

Area

  • Engine, CLI or server (edge0-infer/)
  • Model asset tools (edge0-infer/tools/assets/)
  • Chat app examples (edge0-infer/examples/)
  • Model docs (docs/)
  • Other (scripts/package/windows/, edge0-strata/src/program/generate.cpp)

How was it tested?

Windows 11 Arm64, NVIDIA RTX Spark N1X (CUDA 13.4, clang-cl 23.1.4, MSVC 14.44, Vulkan SDK 1.4.363.1, portable toolchains loaded with -EnvScript), commit 3203c39 (the 0.2.0 release commit):

  • fetch: 5 min cold, 1 min with a warm cache. build: 52 min from a clean clone, all checks passed.
  • verify: SHA-256, layout, PE machine 0xAA64 and build paths OK; edge0-infer info reports 0.2.0, 3203c39…, source_modified: no and the N1X as Vulkan device; strata 0.1.55; Python packages, edge0-strata modules and server.py --help OK.
  • Compared with the released edge0-chat-0.2.0-windows-arm64.zip: same file list, except that the new package no longer has the 15 dist-info/direct_url.json files (they held local wheel paths); edge0-infer.exe, strata.exe and strata_kq.dll have the same sizes; Edge0 Chat.exe is 20 KB smaller (vendored crate paths).
  • Edge0 Chat.exe from the extracted package opens its "Edge0 Chat" window and starts WebView2.

x64 is not tested yet: it needs a run on the x64 build machine (same three commands). Not tested by the script: loading a model in the app.

The setenv fix, Windows 11 Arm64: before, the strata / strata_kq build of main (-k 0) failed only in generate.cpp (use of undeclared identifier 'setenv'); after, it compiles and links and strata.exe --version prints strata 0.1.55. Then the whole package of this branch's head (main + the fix, 5decd1e): build 48 min, verify passed (edge0-infer info reports 5decd1e…, source_modified: no; strata 0.1.55; Python packages, modules and server.py --help OK). The x64 (MSVC) build of this line is not run, but _putenv_s is already used the same way in this file in the 0.2.0 x64 build.

Checklist

  • ctest --preset cpu -L "L0|L1" passes locally in edge0-infer/ (engine changes) — no engine changes
  • Ran the higher test levels this change affects (see edge0-infer/docs/testing.md) — full Arm64 package build and verify
  • Added/updated tests for new behavior
  • Updated relevant docs / READMEs (incl. translations if user-facing)

shuk777 and others added 2 commits November 16, 2026 14:31
…f Edge0 Chat (x64 and Arm64)

Co-authored-by: Cursor <cursoragent@cursor.com>
…which has no setenv

Co-authored-by: Cursor <cursoragent@cursor.com>
@shuk777 shuk777 changed the title scripts/package/windows: build, pack and check the Windows packages of Edge0 Chat (x64 and Arm64) Windows packaging script (x64 and Arm64), and fix the Windows build of edge0-strata Nov 16, 2026
@shuk777

shuk777 commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

Solved by #259

@shuk777 shuk777 closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant