Skip to content

Support Windows hosts - #62

Merged
luciusmagn merged 6 commits into
lambda-symbolics:masterfrom
mattneel:port/windows
Sep 9, 2026
Merged

Support Windows hosts#62
luciusmagn merged 6 commits into
lambda-symbolics:masterfrom
mattneel:port/windows

Conversation

@mattneel

@mattneel mattneel commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What

Ports Autolith to Windows x86-64 on the official SBCL binary, following the plan in six commits:

  1. Add the platform protocol with POSIX and Windows adapters. src/core/platform.lisp defines the generics (file status and identity, private files and modes, publication and replacement, tree deletion, environment, truename, terminal and shell, local sockets, capabilities); platform-posix.lisp keeps today's behaviour on Linux and macOS; platform-win32.lisp binds the wide kernel32 and advapi32 entry points with SB-ALIEN and never touches SB-WIN32.
  2. Route host-specific calls through the platform protocol. Every sb-posix, sb-unix, and truename use in src/ goes through the protocol; #+win32 appears only in the two adapters, in autolith.asd feature expressions, and in the standalone scripts that run before the system loads.
  3. Add the test fixture protocol and gate host-specific checks. Checks that need symbolic links, FIFOs, device nodes, file modes, fork, pseudo-terminals, a POSIX shell, or names with pathname metacharacters go through with-test-fixture and are recorded as FiveAM skips where the host lacks them, never as passes.
  4. Add Windows launchers, runtime, and build scripts. bin\autolith.cmd, bin\autolith.ps1, bin\autolith-runtime.ps1, script\check.ps1, script\bootstrap.ps1, and the Lisp side (script/runtime.lisp, script/launcher.lisp, script/roots.lisp). The runtime script downloads the official SBCL MSI pinned in sbcl-windows-releases.sha256, unpacks it below the data root with msiexec /a, and installs the verified SBCL source tree so Lisp workers resolve implementation source. The fast-startup image is built by a fresh process where fork is unavailable.
  5. Add winhttp to the locked dependencies.
  6. Document the Windows port. docs/windows-port-review.org records every decision the plan asked to be told about, the upstream references, what was verified where, and what is not done.

Windows withholds, each with a user-visible reason: sandboxed command execution, detached sessions and the localgroup handoff, fork-based checkpoints and forked image saves, and filesystem sockets. Workers save images by restarting from the saved core. Privacy is expressed through access control lists naming the process token's user and SYSTEM, never through the read-only attribute.

Depends on

The locked dependencies need the Windows changes in these pull requests; qlfile.lock should be re-pinned to their merged commits before this one merges (it still pins the pre-port revisions here):

The bootstrap also needs three small changes to qlot (symlink-free cache handling and skipping tar entries whose names NTFS forbids); they are described in the review notes and will go to fukamachi/qlot separately.

Verification

  • Windows 11, pinned SBCL 2.6.6: script\check.ps1 --jobs 8 reports 467 cases, 5,126 checks, 0 failures. The recovery probe and listing pass; the recovery fallback fails by construction on an uncommitted branch because it runs the source committed at HEAD, and passes once merged.
  • Linux, WSL2 Ubuntu, SBCL 2.6.6: ./script/check --jobs 8 reports 470 cases, 5,852 checks, 0 failures, recovery checks passing, after every change.
  • Interactive session on Windows from the fast-startup image: startup in under a second, banner, input, Enter, --immutable, and the /auth key prompt.

Full notes: docs/windows-port-review.org.

@luciusmagn
luciusmagn marked this pull request as ready for review September 9, 2026 19:33
@luciusmagn
luciusmagn merged commit 3702c89 into lambda-symbolics:master Sep 9, 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.

2 participants