std: the prelude becomes a pure re-export facade — implementations move to std/core.sx, std/fmt.sx, std/list.sx

std.sx now contains only alias declarations (the re-export mechanism:
own decls carry one flat-import level) over three part-files: core.sx
(builtins, libc escape hatch, Source_Location/Allocator/Context/Into,
the reserved `string` decl — which needs and permits no alias), fmt.sx
(print/format/any_to_string/string ops/cstring/alloc_slice), list.sx
(List). The namespace tail is unchanged; the part-file namespaces
(core/fmt/list) carry alongside it. Consumer surface is byte-identical
— every bare prelude name resolves through the aliases (0120/0121
machinery). 37 .ir snapshots re-pinned: pure string-constant
renumbering from the changed import graph (digit-normalized diff is
empty). Gates: zig build test 426/426, suite 588/588, m3te 23/23,
game SxChess builds + bundles.
This commit is contained in:
agra
2026-06-11 19:25:49 +03:00
parent 340be402a5
commit 49a36bb492
43 changed files with 35649 additions and 35322 deletions

View File

@@ -577,8 +577,8 @@ Wiring a new bundling step:
| `implementation_plan.md` | Archive of completed work (closures, protocols, etc.). Do not pick up tasks from here. |
| `readme.md` | User-facing language overview — **maintained**. Update it whenever a user-facing sx change lands (new/changed syntax, semantics, gating diagnostics, language behavior), per the docs-track-changes rule. |
| `CLAUDE.md` | This file. Session instructions. |
| `library/modules/std.sx` | The prelude (print/format/List/string ops/Context/Allocator) + the namespace tail (`mem`/`xml`/`log`/`fs`/`process`/`socket`/`json`/`cli`/`hash`/`test` carried to flat importers). |
| `library/modules/std/` | Stdlib modules: mem (allocators), fs, process, socket, json, cli, hash, xml, log, trace, test — all but trace carried by the std.sx tail; direct file imports give bare access. |
| `library/modules/std.sx` | The prelude FACADE — pure re-exports (alias decls) over the part-files `std/core.sx` (builtins, libc escape hatch, Context/Allocator/Into/Source_Location/string), `std/fmt.sx` (print/format/*_to_string/string ops), `std/list.sx` (List) + the namespace tail (`mem`/`xml`/`log`/`fs`/`process`/`socket`/`json`/`cli`/`hash`/`test` carried to flat importers). No implementations live here. |
| `library/modules/std/` | Stdlib modules: core, fmt, list (the prelude part-files — consumers reach them through std.sx, not directly), mem (allocators), fs, process, socket, json, cli, hash, xml, log, trace, test — all but trace and the part-files carried by the std.sx tail; direct file imports give bare access. |
| `library/modules/ffi/` | FFI bindings: objc, objc_block, sdl3, opengl, raylib, stb, stb_truetype, wasm. |
| `library/modules/math/` | scalar / vector2 / matrix44 — one spelling: `#import "modules/math"` (directory import). |
| `library/modules/build.sx` | `BuildOptions` compile-time build DSL. See "Bundling lives in sx" above. |