aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Geissler <peter@haxx.in>2026-08-28 14:22:57 +0200
committerPeter Geissler <peter@haxx.in>2026-08-28 14:22:57 +0200
commit7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4 (patch)
tree8f5cf4a5614f9b5af86a4c5a230e48469d0a54d8
parentwindows: fall back to `edit`, not to a notepad window (diff)
downloadslosh-7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4.tar.gz
slosh-7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4.tar.xz
slosh-7941820413d82b3d62d7fc2ac15ef0e1b3b69ee4.zip
docs: the Windows build is a cross-compile, and only that
The docs offered a native build as an equal alternative -- "the same command builds natively on the Windows box itself, with zig on PATH and a make" -- and it does not work. Makefile.windows needs sed, cat, mkdir -p and shell grouping, none of which cmd.exe has; and on ARM64 `zig cc` in zig 0.16.0 dies with an access violation on a one-line C file, so the compiler cannot run there at all. The zip that does it matches the published shasum, so this is upstream rather than a bad download. Nobody following those two sentences reached a binary. So they are gone, along with the "# host arch, native" usage line in the makefile and the "cross-compiles too" aside in the two install sections, which both implied that building on the box was the normal path and the cross-compile a bonus. It is the other way round, and now the pages say so once, in the same words each time. `builds and runs natively` on the doc's first line loses `builds`: what is native about slosh.exe is the binary, not where it was made.
-rw-r--r--Makefile.windows6
-rw-r--r--README.md4
-rw-r--r--docs/index.md4
-rw-r--r--docs/windows.md19
4 files changed, 19 insertions, 14 deletions
diff --git a/Makefile.windows b/Makefile.windows
index 99ba6f7..14b8995 100644
--- a/Makefile.windows
+++ b/Makefile.windows
@@ -1,11 +1,11 @@
-# slosh for Windows — cross-compiled with zig, or built natively on the box.
+# slosh for Windows — cross-compiled with zig from a mac or a Linux box.
#
# `compat/win` comes first on the include path: it holds stub <poll.h>,
# <sys/socket.h> and friends that redirect to include/compat_win.h, so the
# existing sources keep their POSIX includes and call sites unchanged.
#
-# make -f Makefile.windows # host arch, native
-# make -f Makefile.windows ARCH=x86_64 # cross to x86_64
+# make -f Makefile.windows # ARCH=aarch64, the default
+# make -f Makefile.windows ARCH=x86_64
#
ZIG ?= zig
ARCH ?= aarch64
diff --git a/README.md b/README.md
index 94bf285..8bc03de 100644
--- a/README.md
+++ b/README.md
@@ -37,8 +37,10 @@ Windows 10/11, x86-64 and ARM64, as one `slosh.exe` with no runtime
dependency beyond the OS. Panes are ConPTYs and sessions are AF_UNIX sockets,
so everything below works there too — see [docs/windows.md](docs/windows.md).
+Cross-compiled from a mac or a Linux box, then copied across:
+
```bash
-make -f Makefile.windows ARCH=x86_64 # or ARCH=aarch64; cross-compiles too
+make -f Makefile.windows ARCH=x86_64 # or ARCH=aarch64
```
## Run
diff --git a/docs/index.md b/docs/index.md
index d7513dc..ad90c7f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -37,8 +37,10 @@ there.)
Windows 10/11, x86-64 and ARM64, as one `slosh.exe`. Panes are ConPTYs and
sessions are AF_UNIX sockets, so everything documented here works there too.
+Cross-compiled from a mac or a Linux box, then copied across:
+
```bash
-make -f Makefile.windows ARCH=x86_64 # or ARCH=aarch64; cross-compiles too
+make -f Makefile.windows ARCH=x86_64 # or ARCH=aarch64
```
The details, and the three decisions the port rests on: [windows](windows.md).
diff --git a/docs/windows.md b/docs/windows.md
index 12b4a8c..861a3cd 100644
--- a/docs/windows.md
+++ b/docs/windows.md
@@ -1,20 +1,21 @@
# Windows
-slosh builds and runs natively on Windows 10/11, on both x86-64 and ARM64. It
-is one `slosh.exe` with no runtime dependency beyond the OS.
+slosh runs natively on Windows 10/11, on both x86-64 and ARM64. It is one
+`slosh.exe` with no runtime dependency beyond the OS.
+
+The build is a cross-compile, from a mac or a Linux box:
```bash
-make -f Makefile.windows ARCH=x86_64 # cross-compile from mac or Linux
+make -f Makefile.windows ARCH=x86_64
make -f Makefile.windows ARCH=aarch64
```
-`ARCH` defaults to `aarch64`. The same command builds natively on the Windows
-box itself, with zig on `PATH` and a `make`. The vendored terminal core is
-cross-compiled the same way and lands in
-`vendor/libghostty-vt/zig-out-win-<arch>`, so the two architectures never share
-an output directory.
+`ARCH` defaults to `aarch64`. The vendored terminal core is cross-compiled the
+same way and lands in `vendor/libghostty-vt/zig-out-win-<arch>`, so the two
+architectures never share an output directory.
-The binary appears at `build/win-<arch>/slosh.exe`.
+The binary appears at `build/win-<arch>/slosh.exe`; copy that to the Windows
+machine.
## What it does there