Browse Source

G-153 progress: increment 1 - core + regress ported, zig build green dual-arch

metakit_punk b9670b3 (local; gitea push pending): pooryorick core/tests
ported byte-identical + root build.zig/zon + regress_check driver +
LICENSE. zig build + zig build test green for x86_64-windows AND
x86-windows under pinned zig 0.16.0 (248 ok-file matches per arch,
32-bit natively via WoW64). Spike answered: core is exception-free and
RTTI-free (-fno-exceptions/-fno-rtti live); UBSan accommodation
-fno-sanitize=undefined per suite tcl/tk/zlib precedent. Remaining
acceptance items listed in the detail file Progress section.

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 1 week ago
parent
commit
5a497be7c8
  1. 46
      goals/G-153-metakit-punk-zig-port.md

46
goals/G-153-metakit-punk-zig-port.md

@ -134,3 +134,49 @@ section) and as the proof that a zig-built Mk4tcl works at all.
src/buildsuites, bin/runtime/win32-ix86 -> G-101 G-131 G-105 G-130 (all
named above); suite_tcl90-side neighbours G-108/G-110/G-116 are
target/debug/tls lanes with no metakit coupling beyond shared suite dirs.
## Progress
Increment 1 landed 2026-08-02 (metakit_punk commit b9670b3, local master -
push to the gitea origin pending): pooryorick core + regress suite ported
byte-identical (src/include 6 headers, src/core 40 files + config.h fork
addition, src/tests 18 sources + 248-file ok/ set + fixtures/reversed from
upstream unix/); root build.zig + build.zig.zon (package .metakit_punk 0.1.0,
min zig 0.16.0) + tools/regress_check.zig host driver; root LICENSE (MIT/X11
license.terms verbatim). VERIFIED: 'zig build' plus 'zig build test
-Dtarget=x86_64-windows' and -Dtarget=x86-windows all green under the pinned
zig 0.16.0 (6/6 build steps each; 32-bit regress executed natively via WoW64;
independent rerun of each arch binary + 'diff -r --strip-trailing-cr
src/tests/ok' clean at 248 files per arch) - the acceptance's first clause is
met by the current tree and re-verifies at the final pinned commit.
Port findings worth keeping (details in the fork's src/AGENTS.md + build.zig):
- The Approach's C++ spike question is answered: the core is exception-free
(zero throw/try/catch sites) and RTTI-free; -fno-exceptions -fno-rtti are
live fork flags, so the ix86 EH story is a non-issue. The regress harness's
try/catch compiles away under __GNUC__ (q4_NOTHROW).
- zig cc's default trapping UBSan fires on 2007-era formal UB
(derived.cpp:308 c4_FilterSeq::PreChange binds a reference to a null
c4_Cursor on non-insert notifications) -> -fno-sanitize=undefined
-fno-sanitize-trap=undefined, the suite's tcl/tk/zlib accommodation. A
source-level UB-hygiene pass would be a fork improvement project, not port
scope.
- config.h (autoconf/CMake product upstream) is a tracked fork file:
HAVE_MEMMOVE is its only live setting on clang/mingw targets; q4_I86/M68K
CPU flags are defined-but-unused, format portability is byte-level by
design.
- Container layer q4_UNIV default (std.cpp excluded) per upstream CMake;
library installs as lib/mk4.lib (0.16 name) + include/{mk4*.h,*.inl} - the
linkLibrary(dep.artifact("mk4")) consumer shape the suite arm needs.
Remaining for acceptance:
- KitCreator mk4tcl patch-set audit (eight patches vs 2.4.9.7) with per-patch
disposition recorded here as fork commits citing origin.
- Mk4tcl binding as stubs-linked dll against the suite tcl core-8-6-branch pin
(1d1d5cbd91; lazy zon dep + -Dtcl-src option per Approach) + tclsh86t load
and mk::file round-trip transcript recorded here.
- x86_64 <-> ix86 mk4 datafile interchange check (both directions).
- Static-embed shape (Tcl_StaticPackage) into a kit-class shell copy, or its
blocker recorded here.
- Fork commit pinned + ready-to-land sources.config and build.zig.zon record
text captured here (drafts above become concrete once the port is pushed).

Loading…
Cancel
Save