7.2 KiB
G-130 32-bit windows runtimes from the buildsuites, both Tcl generations
Status: proposed Scope: src/buildsuites/suite_tcl90/ and src/buildsuites/suite_tcl86/ (the win32-ix86 target invocation and any recipe or flag divergence 32-bit forces); src/buildsuites/ (target dimension as settled by G-105 - no per-target tree copies); bin/runtime/win32-ix86/ (output tier - already holds the third-party comparison runtimes); punkbin per-target artifact layout with G-103 metadata carrying the target Goal: punkshell's own buildsuites produce current 32-bit windows (win32-ix86) runtimes for BOTH Tcl generations from source with the pinned zig toolchain, so a machine that is old, firewalled or sandboxed - and that carries tcl8-only or tcl9-only binary modules which must be dropped in - can be served whichever generation its modules need from one supplier we control, instead of depending on third-party builds that no single source keeps current for both majors. Acceptance: suite_tcl86 and suite_tcl90 each produce a win32-ix86 runtime through the documented target invocation, without disturbing the native build and without a per-target copy of the suite tree; each artifact runs on windows executing a script and resolving its bundled companions (thread and tclvfs for the 8.6 runtime, thread for the 9 runtime), with tcl_platform(pointerSize) 4 recorded; each loads a 32-bit BINARY EXTENSION - the motivating capability - verified against a real one rather than a stub (twapi 4.7.2 as shipped in bin/runtime/win32-ix86/tclsh8.6.10-luck-zip.exe is a 32-bit dll already in the tree for the 8.6 side; the 9-side extension is named at activation); each suite's core-testsuite run is recorded here against its own 32-bit baseline with every divergence from the corresponding 64-bit baseline dispositioned; any pointer-size or ABI assumption the 32-bit target exposes in the suite recipes is recorded; and the artifacts land in bin/runtime/win32-ix86/ and publish with G-103 metadata whose target names the 32-bit platform, so 'punk-runtime.cmd list -platform win32-ix86' shows them beside the third-party runtimes they are intended to replace.
Context
The motivation is not architectural completeness, it is supply. Old, firewalled or sandboxed systems - industrial ones especially - are where 32-bit still turns up, and those are exactly the machines that cannot go and fetch what they need. Such a system may carry binary Tcl modules built for only one major version, so the runtime has to match the modules rather than the other way round. There is no single supplier keeping current 32-bit windows Tcl available for BOTH majors, which means today the answer is assembled from third-party builds of differing vintage and provenance.
punkshell already builds Tcl from source with a pinned zig toolchain for both generations (suite_tcl90, suite_tcl86 - G-096/G-098/G-099/G-100), and G-105 establishes the target as an invocation dimension rather than a tree copy. 32-bit windows is the first target where the change is one of BITNESS rather than OS, which is what makes it worth its own goal: it exercises pointer-size and ABI assumptions that a linux-x86_64 cross does not.
Two third-party 32-bit runtimes now sit in bin/runtime/win32-ix86/ and serve as the
comparison baseline for what a suite-built pair would replace:
tclsh8.6.10-luck-zip.exe (Lean Undroidwish Construction Kit, Tcl 8.6.10, zipfs backport,
38 bundled packages) and tclsh9.1b0-tclsfe.exe (apnadkarni/tcl-sfe, Tcl 9.1b0). Between
them they demonstrate the shape is achievable; neither is ours, and neither is current for
the other's generation.
Approach
- Treat 32-bit windows as one more value of G-105's target dimension, not a suite fork. If it cannot be expressed that way, that is a finding about the dimension's design and belongs back in G-105 before this goal proceeds.
- Build BOTH generations before declaring the goal met. A single-generation result does not serve the motivating case, which is precisely that the machine's modules dictate the generation.
- Gate on loading a real 32-bit binary extension. Producing a runtime that starts is not the outcome; producing one that can accept the drop-in modules those systems carry is.
- Compare against the third-party specimens rather than only against a self-consistent baseline - they are the status quo this replaces.
Alternatives considered
- Keep sourcing 32-bit windows Tcl from third parties - rejected as the status quo the goal exists to end: no single supplier is current for both majors, and provenance for a locked-down deployment target is exactly where third-party binaries are weakest (G-026/G-063 direction).
- Build 32-bit for one generation only (whichever is easier) - rejected: the motivating systems are those whose existing binary modules force the choice of generation, so a one-generation answer leaves half of them unserved.
- Defer until FreeBSD and other targets land - rejected on the developer's sequencing (recorded 2026-07-27): this should slot in before or around the FreeBSD work, because the bitness axis is likelier to surface recipe assumptions than another OS on the same bitness, and finding those early is cheaper.
Notes
- Depends on: G-105 - the target-as-invocation-dimension mechanism and the punkshell-platform-dir vs zig-triple naming mapping. This goal is a consumer of that decision and a second exercise of it after linux.
- Related: G-101 - which container a suite-built 8.6 runtime can be wrapped into is decided there, not here. THIS GOAL PRODUCES RUNTIMES, NOT KITS: kit/container type is deliberately out of Scope, so a 32-bit runtime that is not yet wrappable still satisfies it. The two meet when G-101's decision lands.
- Related: G-123 - the artifacts publish through the runtime-tier mechanism, and
punk-runtime.cmd list -platform win32-ix86is where a user would see suite-built runtimes appear beside the third-party ones. - Related: G-129 (achieved 2026-07-27 - see goals/archive/G-129-kitboot-mountpoint-derivation.md)
- the third-party 8.6 specimen in this tier is what exposed punkshell's kit-boot mount-point assumption. That is a boot-path concern and separate from producing the runtime, but both goals use the same two specimens, now wrapped as the active verification kits punkluck86 + punk91ix86.
- Related: G-018 (superseded) - plain zig-built tclsh kits carrying no punk infrastructure; the same "punkshell as a Tcl supplier, not only a shell" direction this goal serves.
punk::platform::localalready reportswin32-ix86correctly from a 32-bit interpreter (verified 2026-07-27 on both third-party runtimes), andmake.tcl checkderiveshost=win32-ix86 target=win32-ix86 store=bin/runtime/win32-ix86when driven by one. No platform-canon work is required; the tier name the store already uses is the canonical one.- G-133 (archived) is what lets this goal's first-party 32-bit runtimes/packages grow the win32-ix86 verification kits' payloads without advisory noise: binaries under platform-discriminated subdirs (win32-ix86/ etc) are exempt from the bake's arch scan, and the kits' smoke-require declarations (punkluck86 Thread; punk91ix86 Thread iocp) probe resolution inside the built 32-bit artifacts - see goals/archive/G-133-bake-payload-consistency-checks.md.