diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ac0891e..200aa5b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The latest `## [X.Y.Z]` header must match the `version` field in `punkproject.to Entries are newest-first; one bullet per notable change. See the root `AGENTS.md` "Project Versioning" section for the bump policy. +## [0.18.4] - 2026-07-22 + +- Platform matrix: `win32-ix86` (32-bit x86 windows) added to `punk::platform` / `help platforms` - status supported, runtime+lib tiers, buildsuite `candidate` (zig can target it; a buildsuite is undetermined - hosting for available third-party runtimes/libs is supported regardless). `vendorlib_tcl8`/`_tcl9` gained the platform dirs; `punk-runtime` detects genuine 32-bit windows hosts (32-bit shells on 64-bit OS keep the x86_64 default); `punk::platform::normalize` folds hand-typed `i386`/`i486`/`i586`/`i686` to `ix86`. + ## [0.18.3] - 2026-07-22 - `bin/punk-runtime.cmd` `list -remote` (powershell payload): the local column now uses the shared runtime-candidate filter, so `active.toml`, artifact metadata tomls, stray `.log` files, `.tmp`/build copies and directories no longer appear as local runtimes in the server comparison (bash payload already filtered). diff --git a/bin/punk-runtime.cmd b/bin/punk-runtime.cmd index 93b076e1..1583056d 100755 --- a/bin/punk-runtime.cmd +++ b/bin/punk-runtime.cmd @@ -1349,9 +1349,13 @@ elif [[ "$plat" == "OpenBSD"* ]]; then local_platform="openbsd-$narch" os="openbsd" elif [[ "$plat" == "MINGW32"* ]]; then - #REVIEW + #32-bit msys shell - a genuine 32-bit machine reports i*86; a 32-bit shell + #on a 64-bit OS is rare enough that the machine arch decides (REVIEW) os="win32" - local_platform="win32-x86_64" + case "$arch" in + i*86) local_platform="win32-ix86";; + *) local_platform="win32-x86_64";; + esac rt_default="tclsh902z.exe" runtime_available=1 elif [[ "$plat" == "MINGW64"* ]]; then @@ -1362,7 +1366,10 @@ elif [[ "$plat" == "MINGW64"* ]]; then runtime_available=1 elif [[ "$plat" == "CYGWIN_NT"* ]]; then os="win32" - local_platform="win32-x86_64" + case "$arch" in + i*86) local_platform="win32-ix86";; + *) local_platform="win32-x86_64";; + esac rt_default="tclsh902z.exe" runtime_available=1 elif [[ "$plat" == "MSYS_NT"* ]]; then @@ -2391,9 +2398,15 @@ function Show-PunkRuntimeHelp { #win32-x86_64, linux-x86_64, macosx) - NOT zig triples (the buildsuite maps triples to #platform dirs at build time; punk-runtime speaks only the punkbin tier). Validation is #deliberately shape-only: the server's sha1sums/404 is the truth for what exists. -#This payload runs on windows - the local default stays win32-x86_64 (a windows-arm -#default becomes a question when punkbin carries such a folder). +#This payload runs on windows - the local default is win32-x86_64, or win32-ix86 on +#a GENUINE 32-bit windows host (PROCESSOR_ARCHITECTURE x86 with no +#PROCESSOR_ARCHITEW6432 - a 32-bit shell on a 64-bit OS keeps the x86_64 default: +#the runtime store serves what the OS can run). A windows-arm default becomes a +#question when punkbin carries such a folder. $script:PunkLocalPlatform = "win32-x86_64" +if ($env:PROCESSOR_ARCHITECTURE -eq 'x86' -and -not $env:PROCESSOR_ARCHITEW6432) { + $script:PunkLocalPlatform = "win32-ix86" +} function Resolve-PunkRuntimePlatform { param([string] $requested) $plat = $script:PunkLocalPlatform diff --git a/goals/G-105-buildsuite-cross-target.md b/goals/G-105-buildsuite-cross-target.md index 21e337fc..f0337d74 100644 --- a/goals/G-105-buildsuite-cross-target.md +++ b/goals/G-105-buildsuite-cross-target.md @@ -111,3 +111,13 @@ dimension), G-102 (achieved 2026-07-21 - driver shape settled; target becomes a examples). Current values: win32-x86_64 supported (suite_tcl90), linux-x86_64 planned (this goal), linux-arm64/linux-arm/macosx/freebsd-* candidate, remainder none. This goal updates the field as targets land. +- 2026-07-22 canon addendum (user): win32-ix86 added to the punk::platform + matrix - status supported, tiers runtime+lib, buildsuite CANDIDATE (zig can + target 32-bit windows but a buildsuite is undetermined; hosting for + available third-party runtimes/libs is wanted regardless - the + hosting-vs-building axis working as intended). vendorlib_tcl8/9 gained the + win32-ix86 dirs per the tree contract; punk-runtime local detection returns + win32-ix86 on genuine 32-bit windows hosts (ps1: PROCESSOR_ARCHITECTURE x86 + without ARCHITEW6432 - a 32-bit shell on a 64-bit OS keeps x86_64 since the + runtime store serves what the OS runs; bash: i*86 machine in the MINGW32/ + CYGWIN prongs); normalize folds hand-typed i386/i486/i586/i686 to ix86. diff --git a/punkproject.toml b/punkproject.toml index b9f45fdb..7a0c6784 100644 --- a/punkproject.toml +++ b/punkproject.toml @@ -1,4 +1,4 @@ [project] name = "punkshell" -version = "0.18.3" +version = "0.18.4" license = "BSD-2-Clause" diff --git a/src/modules/punk/platform-999999.0a1.0.tm b/src/modules/punk/platform-999999.0a1.0.tm index fc38b552..75f1a5a3 100644 --- a/src/modules/punk/platform-999999.0a1.0.tm +++ b/src/modules/punk/platform-999999.0a1.0.tm @@ -74,6 +74,7 @@ namespace eval punk::platform { # none - no build intention; hosted/third-party runtimes only variable platforms { win32-x86_64 {status supported tiers {runtime lib} buildsuite supported notes "primary development platform (suite_tcl90)"} + win32-ix86 {status supported tiers {runtime lib} buildsuite candidate notes "32-bit x86; hosting for available third-party runtimes/libs - zig can target it but a buildsuite is undetermined"} linux-x86_64 {status supported tiers {runtime lib} buildsuite planned notes "G-105 first cross-target, WSL-verified"} linux-arm64 {status supported tiers {runtime lib} buildsuite candidate notes "aarch64; punkbin's existing arm kit predates the arm64 name and sits in linux-arm"} linux-arm {status supported tiers {runtime lib} buildsuite candidate notes "32-bit arm"} @@ -164,6 +165,7 @@ namespace eval punk::platform { switch -- $cpu { amd64 {set cpu x86_64} aarch64 {set cpu arm64} + i386 - i486 - i586 - i686 {set cpu ix86} arm { if {$os eq "macosx"} { set cpu arm64 diff --git a/src/project_layouts/vendor/punk/project-0.1/bin/punk-runtime.cmd b/src/project_layouts/vendor/punk/project-0.1/bin/punk-runtime.cmd index 93b076e1..1583056d 100644 --- a/src/project_layouts/vendor/punk/project-0.1/bin/punk-runtime.cmd +++ b/src/project_layouts/vendor/punk/project-0.1/bin/punk-runtime.cmd @@ -1349,9 +1349,13 @@ elif [[ "$plat" == "OpenBSD"* ]]; then local_platform="openbsd-$narch" os="openbsd" elif [[ "$plat" == "MINGW32"* ]]; then - #REVIEW + #32-bit msys shell - a genuine 32-bit machine reports i*86; a 32-bit shell + #on a 64-bit OS is rare enough that the machine arch decides (REVIEW) os="win32" - local_platform="win32-x86_64" + case "$arch" in + i*86) local_platform="win32-ix86";; + *) local_platform="win32-x86_64";; + esac rt_default="tclsh902z.exe" runtime_available=1 elif [[ "$plat" == "MINGW64"* ]]; then @@ -1362,7 +1366,10 @@ elif [[ "$plat" == "MINGW64"* ]]; then runtime_available=1 elif [[ "$plat" == "CYGWIN_NT"* ]]; then os="win32" - local_platform="win32-x86_64" + case "$arch" in + i*86) local_platform="win32-ix86";; + *) local_platform="win32-x86_64";; + esac rt_default="tclsh902z.exe" runtime_available=1 elif [[ "$plat" == "MSYS_NT"* ]]; then @@ -2391,9 +2398,15 @@ function Show-PunkRuntimeHelp { #win32-x86_64, linux-x86_64, macosx) - NOT zig triples (the buildsuite maps triples to #platform dirs at build time; punk-runtime speaks only the punkbin tier). Validation is #deliberately shape-only: the server's sha1sums/404 is the truth for what exists. -#This payload runs on windows - the local default stays win32-x86_64 (a windows-arm -#default becomes a question when punkbin carries such a folder). +#This payload runs on windows - the local default is win32-x86_64, or win32-ix86 on +#a GENUINE 32-bit windows host (PROCESSOR_ARCHITECTURE x86 with no +#PROCESSOR_ARCHITEW6432 - a 32-bit shell on a 64-bit OS keeps the x86_64 default: +#the runtime store serves what the OS can run). A windows-arm default becomes a +#question when punkbin carries such a folder. $script:PunkLocalPlatform = "win32-x86_64" +if ($env:PROCESSOR_ARCHITECTURE -eq 'x86' -and -not $env:PROCESSOR_ARCHITEW6432) { + $script:PunkLocalPlatform = "win32-ix86" +} function Resolve-PunkRuntimePlatform { param([string] $requested) $plat = $script:PunkLocalPlatform diff --git a/src/scriptapps/bin/punk-runtime.bash b/src/scriptapps/bin/punk-runtime.bash index 46711e19..79426914 100644 --- a/src/scriptapps/bin/punk-runtime.bash +++ b/src/scriptapps/bin/punk-runtime.bash @@ -69,9 +69,13 @@ elif [[ "$plat" == "OpenBSD"* ]]; then local_platform="openbsd-$narch" os="openbsd" elif [[ "$plat" == "MINGW32"* ]]; then - #REVIEW + #32-bit msys shell - a genuine 32-bit machine reports i*86; a 32-bit shell + #on a 64-bit OS is rare enough that the machine arch decides (REVIEW) os="win32" - local_platform="win32-x86_64" + case "$arch" in + i*86) local_platform="win32-ix86";; + *) local_platform="win32-x86_64";; + esac rt_default="tclsh902z.exe" runtime_available=1 elif [[ "$plat" == "MINGW64"* ]]; then @@ -82,7 +86,10 @@ elif [[ "$plat" == "MINGW64"* ]]; then runtime_available=1 elif [[ "$plat" == "CYGWIN_NT"* ]]; then os="win32" - local_platform="win32-x86_64" + case "$arch" in + i*86) local_platform="win32-ix86";; + *) local_platform="win32-x86_64";; + esac rt_default="tclsh902z.exe" runtime_available=1 elif [[ "$plat" == "MSYS_NT"* ]]; then diff --git a/src/scriptapps/bin/punk-runtime.ps1 b/src/scriptapps/bin/punk-runtime.ps1 index 812f42e0..21a462eb 100644 --- a/src/scriptapps/bin/punk-runtime.ps1 +++ b/src/scriptapps/bin/punk-runtime.ps1 @@ -143,9 +143,15 @@ function Show-PunkRuntimeHelp { #win32-x86_64, linux-x86_64, macosx) - NOT zig triples (the buildsuite maps triples to #platform dirs at build time; punk-runtime speaks only the punkbin tier). Validation is #deliberately shape-only: the server's sha1sums/404 is the truth for what exists. -#This payload runs on windows - the local default stays win32-x86_64 (a windows-arm -#default becomes a question when punkbin carries such a folder). +#This payload runs on windows - the local default is win32-x86_64, or win32-ix86 on +#a GENUINE 32-bit windows host (PROCESSOR_ARCHITECTURE x86 with no +#PROCESSOR_ARCHITEW6432 - a 32-bit shell on a 64-bit OS keeps the x86_64 default: +#the runtime store serves what the OS can run). A windows-arm default becomes a +#question when punkbin carries such a folder. $script:PunkLocalPlatform = "win32-x86_64" +if ($env:PROCESSOR_ARCHITECTURE -eq 'x86' -and -not $env:PROCESSOR_ARCHITEW6432) { + $script:PunkLocalPlatform = "win32-ix86" +} function Resolve-PunkRuntimePlatform { param([string] $requested) $plat = $script:PunkLocalPlatform diff --git a/src/vendorlib_tcl8/win32-ix86/README.md b/src/vendorlib_tcl8/win32-ix86/README.md new file mode 100644 index 00000000..be8515f0 --- /dev/null +++ b/src/vendorlib_tcl8/win32-ix86/README.md @@ -0,0 +1,6 @@ +Tcl library dependencies + +pkgIndex.tcl based libraries specific to the win32-ix86 platform (32-bit x86 +windows). Hosting for available third-party libraries - a punkshell buildsuite +for this platform is undetermined (canonical punkshell platform name - see +punk::platform / 'help platforms') diff --git a/src/vendorlib_tcl9/win32-ix86/README.md b/src/vendorlib_tcl9/win32-ix86/README.md new file mode 100644 index 00000000..be8515f0 --- /dev/null +++ b/src/vendorlib_tcl9/win32-ix86/README.md @@ -0,0 +1,6 @@ +Tcl library dependencies + +pkgIndex.tcl based libraries specific to the win32-ix86 platform (32-bit x86 +windows). Hosting for available third-party libraries - a punkshell buildsuite +for this platform is undetermined (canonical punkshell platform name - see +punk::platform / 'help platforms')