feat(windows): publish an x86_64-windows target - #66
Open
dlipicar wants to merge 2 commits into
Open
Conversation
Doc-test reportHeadless Pages can take a minute to update after the run finishes. |
dlipicar
force-pushed
the
feat/windows-target
branch
from
August 14, 2026 22:08
98fa482 to
a0a50be
Compare
dlipicar
marked this pull request as ready for review
August 14, 2026 22:08
dlipicar
force-pushed
the
feat/bump-builder-typed-records
branch
from
August 23, 2026 01:28
29b8b80 to
451652e
Compare
chat_ui cannot cross-build without this: a consumer resolves a
dependency's compiled headers through `packages.<system>`, so with no
Windows entry here chat_ui's own cross build has nothing to read.
(logos-module-builder#199 turns that into a named error instead of a
silent fallback to this source tree, which is how it first surfaced —
as `fatal error: chat_module_api.h: No such file or directory`.)
The builder already understands `x86_64-windows` as a cross
pseudo-system, so this is `packages` only. `apps` and `devShells` both do
`import nixpkgs { inherit system; }`, which for that key is a NATIVE
Windows instantiation and dies in cc-wrapper — and neither a dev shell
nor the codegen runner means anything on a cross target.
Two things this needed beyond the fold:
- The `delivery_module-lgx` re-export is now conditional. The pinned
delivery_module publishes only the native systems, and asking it for a
target it does not build would fail the whole attrset over a
convenience output. chat_module itself is unaffected — its delivery
dependency resolves through the local `.lidl` in dependency_overrides,
never through the dep's packages.
- CMakeLists.txt loses its hand-rolled Rust-staticlib link block. Finding
the archive, re-mentioning logos-protocol after it, and adding the
native libraries Rust's `std` leaves undefined are all done by
logos_module() now, and the local copy ran in ADDITION to it — the
archive, the protocol archive and a set of natives each landed on the
link line twice. Invisible while both agreed; they stopped agreeing on
Windows, where the builder names the Win32 set mingw needs while this
copy still said `pthread dl`.
Builder re-pinned to the rev carrying the Rust cross support
(logos-module-builder#197).
Verified: a 40MB PE32+ x86-64 plugin exporting qt_plugin_instance /
qt_plugin_query_metadata_v2, with aws-lc-rs, rustls, de-mls and libchat
really linked in, and its DLL closure staged alongside.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A target with no CI is half a change: the previous commit publishes
`packages.x86_64-windows`, and nothing yet notices when it stops building or
stops being loadable.
One file, calling logos-co/logos-windows-ci@v1. Everything else -- the Nix
install and cache, the target-existence guard, the cold-cache refusal, the
PE-format and import-closure gates, the .lgx payload gate, the artifact
round-trip check -- lives once in that repo.
WHAT IT COVERS
* the Rust staticlib crossing to mingw at all. It needs
ws2_32/bcrypt/ntdll/userenv/synchronization, which LogosModule.cmake's
APPLE/else split used to deny it by putting `pthread dl` on the Windows
line (logos-module-builder#197);
* the import closure of the built plugin. `bcryptprimitives.dll` was absent
from the bundler's system-DLL allowlist and the symptom was a module that
loaded nowhere (nix-bundle-lgx#12);
* the `.lgx` carrying a real `variants/windows-x86_64` payload whose own
imports ship with it -- what an installed module actually resolves against.
WHAT IT DOES NOT COVER, DELIBERATELY STATED
chat_module is a plugin. Its Windows artifacts are a DLL and a `.lgx`, and
neither can be executed, so this run is COMPILE-ONLY on the smoke axis and
the harness reports that as a coverage gap rather than as a pass. Running the
module needs a host, which is not a target of this flake. That coverage
belongs downstream, next to a runtime.
`lgx-portable` rather than `lgx`: the portable variant is the one that is
actually distributed, and `lgx` links against the Nix store.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dlipicar
force-pushed
the
feat/windows-target
branch
from
August 23, 2026 01:29
d0a3708 to
f24fe19
Compare
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chat_uicannot cross-build without this. A consumer resolves a dependency's compiled headers throughpackages.<system>, so with no Windows entry here, chat_ui's own cross build has nothing to read. That is how this surfaced — asfatal error: chat_module_api.h: No such file or directory, three layers from its cause. logos-co/logos-module-builder#199 turns it into a named error instead of a silent fallback to this source tree.The builder already understands
x86_64-windowsas a cross pseudo-system, so this ispackagesonly.appsanddevShellsboth doimport nixpkgs { inherit system; }, which for that key is a native Windows instantiation and dies in cc-wrapper — and neither a dev shell nor the codegen runner means anything on a cross target.Two things this needed beyond the fold
The
delivery_module-lgxre-export is now conditional. The pinned delivery_module publishes only the native systems, and asking it for a target it does not build would fail the whole attrset over a convenience output. chat_module itself is unaffected: its delivery dependency resolves through the local.lidlindependency_overrides, never through the dep'spackages.CMakeLists.txt loses its hand-rolled Rust-staticlib link block. Finding the archive, re-mentioning logos-protocol after it, and adding the native libraries Rust's
stdleaves undefined are all done bylogos_module()now — and the local copy ran in addition to it, so the archive, the protocol archive and a set of natives each landed on the link line twice:Harmless while both copies agreed. They stopped agreeing on Windows, where the builder names the Win32 set mingw actually needs while this copy still said
pthread dl—dldoes not exist there andpthreadis not on the sysroot search path.Verification
packages.x86_64-windows.defaultbuilds to a 40 MB PE32+ x86-64 plugin exportingqt_plugin_instance/qt_plugin_query_metadata_v2, withaws-lc-rs-1.17.0,rustls-0.23.41,de-mls-4.0.0,hashgraph-like-consensus-0.6.0andlibchatreally linked in, and its DLL closure (includinglibwinpthread-1.dll) staged alongside.Exercised end to end on real Windows: installed into Basecamp alongside chat_ui and delivery_module, the Chat app loads and sends and receives messages over the network.
🤖 Generated with Claude Code
Update — CI for the target
Added
.github/workflows/windows.yml: onewith:block callinglogos-co/logos-windows-ci@v1.A target with no CI is half a change — nothing currently notices when
packages.x86_64-windowsstops building or stops being loadable.The harness cross-builds on an ordinary Linux runner (nix does not run on
Windows) and gates the result.
targets: default lgx-portable—defaultisthe plugin DLL plus the libraries bundled beside it, which is what the
import-closure gate reads;
lgx-portableis the packaged form that is actuallydistributed (
lgxlinks against the Nix store).What it covers — the three things that have actually broken here:
ws2_32/bcrypt/ntdll/userenv/synchronization, whichLogosModule.cmake'sAPPLE/elsesplit used to deny it by puttingpthread dlon the Windowsline (feat(windows): cross-compile Rust modules to x86_64-pc-windows-gnu logos-module-builder#197);
bcryptprimitives.dllwas absentfrom the bundler's system-DLL allowlist and the symptom was a module that
loaded nowhere (fix(windows): treat bcryptprimitives.dll as a system DLL nix-bundle-lgx#12);
lgx-variant: true— the.lgxcarrying a realvariants/windows-x86_64payload whose own imports ship with it, which is what an installed module
resolves against.
What it does not cover, stated rather than implied. chat_module is a
plugin: its Windows artifacts are a DLL and a
.lgx, and neither can beexecuted. So this run is compile-only on the smoke axis, and the harness
reports that as a coverage gap rather than as a pass. Running the module needs
a host, which is not a target of this flake; that coverage belongs downstream,
next to a runtime.
logos-windows-ciis new and has not yet run on a GitHub runner anywhere, sotreat the first CI run here as its acceptance test.