std: organise the facade — thematic groups, aligned columns

Same 47 re-exports, regrouped: compiler-resolved types, type-system/
reflection builtins, output + libc escape hatch, formatting (print/
format up front, the *_to_string family together), string ops +
allocation helpers, fmt internals marked as legacy-surface, List, tail.
Zero output-stream diffs; 37 .ir snapshots re-pinned (renumbering from
decl reordering). Gates: suite 588/588, zig build test 0, m3te 23/23,
game builds + bundles.
This commit is contained in:
agra
2026-06-11 21:46:03 +03:00
parent c75cd9c63c
commit b3b78e25c0
38 changed files with 1109 additions and 1096 deletions

View File

@@ -11,73 +11,86 @@ core :: #import "modules/std/core.sx";
fmt :: #import "modules/std/fmt.sx";
list :: #import "modules/std/list.sx";
// --- core: builtins, libc escape hatch, compiler-resolved types ---
// --- Compiler-resolved types ---
// (`string` has no alias here: it is a reserved type name — its #builtin
// declaration in core.sx resolves program-wide and cannot be re-bound.)
Vector :: core.Vector;
out :: core.out;
size_of :: core.size_of;
align_of :: core.align_of;
libc_malloc :: core.libc_malloc;
libc_free :: core.libc_free;
memcpy :: core.memcpy;
memset :: core.memset;
type_of :: core.type_of;
type_name :: core.type_name;
field_count :: core.field_count;
field_name :: core.field_name;
field_value :: core.field_value;
is_flags :: core.is_flags;
type_is_unsigned :: core.type_is_unsigned;
field_value_int :: core.field_value_int;
field_index :: core.field_index;
error_tag_name :: core.error_tag_name;
Context :: core.Context;
Allocator :: core.Allocator;
Into :: core.Into;
Source_Location :: core.Source_Location;
Allocator :: core.Allocator;
Context :: core.Context;
Into :: core.Into;
// --- fmt: formatting, string helpers, slice/string allocation ---
// --- Type system & reflection builtins ---
cstring :: fmt.cstring;
alloc_slice :: fmt.alloc_slice;
int_to_string :: fmt.int_to_string;
uint_to_string :: fmt.uint_to_string;
bool_to_string :: fmt.bool_to_string;
float_to_string :: fmt.float_to_string;
hex_group :: fmt.hex_group;
decompose_u16x4 :: fmt.decompose_u16x4;
int_to_hex_string :: fmt.int_to_hex_string;
concat :: fmt.concat;
substr :: fmt.substr;
path_join :: fmt.path_join;
struct_to_string :: fmt.struct_to_string;
vector_to_string :: fmt.vector_to_string;
array_to_string :: fmt.array_to_string;
slice_to_string :: fmt.slice_to_string;
pointer_to_string :: fmt.pointer_to_string;
flags_to_string :: fmt.flags_to_string;
enum_to_string :: fmt.enum_to_string;
optional_to_string :: fmt.optional_to_string;
any_to_string :: fmt.any_to_string;
build_format :: fmt.build_format;
Vector :: core.Vector;
size_of :: core.size_of;
align_of :: core.align_of;
type_of :: core.type_of;
type_name :: core.type_name;
type_is_unsigned :: core.type_is_unsigned;
field_count :: core.field_count;
field_name :: core.field_name;
field_value :: core.field_value;
field_value_int :: core.field_value_int;
field_index :: core.field_index;
is_flags :: core.is_flags;
error_tag_name :: core.error_tag_name;
// --- Output & libc escape hatch ---
out :: core.out;
libc_malloc :: core.libc_malloc;
libc_free :: core.libc_free;
memcpy :: core.memcpy;
memset :: core.memset;
// --- Formatting ---
print :: fmt.print;
format :: fmt.format;
print :: fmt.print;
// --- list ---
any_to_string :: fmt.any_to_string;
int_to_string :: fmt.int_to_string;
uint_to_string :: fmt.uint_to_string;
int_to_hex_string :: fmt.int_to_hex_string;
float_to_string :: fmt.float_to_string;
bool_to_string :: fmt.bool_to_string;
struct_to_string :: fmt.struct_to_string;
enum_to_string :: fmt.enum_to_string;
flags_to_string :: fmt.flags_to_string;
vector_to_string :: fmt.vector_to_string;
array_to_string :: fmt.array_to_string;
slice_to_string :: fmt.slice_to_string;
pointer_to_string :: fmt.pointer_to_string;
optional_to_string :: fmt.optional_to_string;
// --- String ops & allocation helpers ---
concat :: fmt.concat;
substr :: fmt.substr;
path_join :: fmt.path_join;
cstring :: fmt.cstring;
alloc_slice :: fmt.alloc_slice;
// fmt internals, re-exported only because they were always part of the
// flat prelude surface.
build_format :: fmt.build_format;
hex_group :: fmt.hex_group;
decompose_u16x4 :: fmt.decompose_u16x4;
// --- Containers ---
List :: list.List;
// --- The stdlib namespace tail: flat-importing std.sx carries these ---
mem :: #import "modules/std/mem.sx";
xml :: #import "modules/std/xml.sx";
log :: #import "modules/std/log.sx";
fs :: #import "modules/std/fs.sx";
mem :: #import "modules/std/mem.sx";
fs :: #import "modules/std/fs.sx";
process :: #import "modules/std/process.sx";
socket :: #import "modules/std/socket.sx";
json :: #import "modules/std/json.sx";
cli :: #import "modules/std/cli.sx";
hash :: #import "modules/std/hash.sx";
test :: #import "modules/std/test.sx";
socket :: #import "modules/std/socket.sx";
json :: #import "modules/std/json.sx";
xml :: #import "modules/std/xml.sx";
cli :: #import "modules/std/cli.sx";
hash :: #import "modules/std/hash.sx";
log :: #import "modules/std/log.sx";
test :: #import "modules/std/test.sx";