std: restructure — std/ modules, namespace tail, std/xml.sx
allocators/fs/process/socket/log/trace/test move under modules/std/ (allocators.sx becomes std/mem.sx; the Allocator protocol moves into the std.sx prelude, impls stay in mem.sx). New std/xml.sx holds xml_escape as xml.escape. std.sx gains the carried namespace tail — flat-importing std.sx now also provides mem./xml./log. — with the remaining modules (fs/process/socket/json/cli/hash/test) deferred from the tail until the global last-wins maps are fully own-wins (pulling them into every closure collides bare names corpus-wide; they stay direct imports: modules/std/fs.sx etc.). log.sx's internal emit renamed log_emit (it clobbered consumer fns named emit program-wide). bundle.sx uses xml.escape via the carried alias. Consumer import paths swept mechanically; .ir snapshots recaptured for the larger std closure. m3te + game build unchanged.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#import "../std.sx";
|
||||
#import "../compiler.sx";
|
||||
#import "../fs.sx";
|
||||
#import "../process.sx";
|
||||
#import "../std/fs.sx";
|
||||
#import "../std/process.sx";
|
||||
|
||||
// =====================================================================
|
||||
// platform.bundle — sx-side Apple `.app` bundler.
|
||||
@@ -269,7 +269,7 @@ build_info_plist :: (opts: BuildOptions, exe_name: string, bundle_id: string) ->
|
||||
<string>{}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST, xml_escape(bundle_id), xml_escape(exe_name), xml_escape(exe_name), IOS_MIN_OS, platform_key);
|
||||
PLIST, xml.escape(bundle_id), xml.escape(exe_name), xml.escape(exe_name), IOS_MIN_OS, platform_key);
|
||||
}
|
||||
|
||||
// macOS (and any non-iOS Apple target) — the minimal plist both
|
||||
@@ -293,7 +293,7 @@ PLIST, xml_escape(bundle_id), xml_escape(exe_name), xml_escape(exe_name), IOS_MI
|
||||
<string>0.1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST, xml_escape(bundle_id), xml_escape(exe_name), xml_escape(exe_name))
|
||||
PLIST, xml.escape(bundle_id), xml.escape(exe_name), xml.escape(exe_name))
|
||||
}
|
||||
|
||||
// Read a `.mobileprovision` and write it to
|
||||
@@ -868,15 +868,15 @@ lib_name_from_so_basename :: (basename: string) -> string {
|
||||
// Otherwise it falls back to the legacy NativeActivity shape with an
|
||||
// `android.app.lib_name` meta-data entry pointing at the .so.
|
||||
build_android_manifest :: (opts: BuildOptions, package: string, lib_name: string) -> string {
|
||||
pkg_esc := xml_escape(package);
|
||||
lib_esc := xml_escape(lib_name);
|
||||
pkg_esc := xml.escape(package);
|
||||
lib_esc := xml.escape(lib_name);
|
||||
if opts.jni_main_count() > 0 {
|
||||
// First `#jni_main` decl drives the Activity. The foreign_path
|
||||
// uses `/` separators; Java fully-qualified class names use
|
||||
// `.` so we rewrite.
|
||||
foreign := opts.jni_main_foreign_path_at(0);
|
||||
cls := slash_to_dot(foreign);
|
||||
cls_esc := xml_escape(cls);
|
||||
cls_esc := xml.escape(cls);
|
||||
return format(#string MANIFEST
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#import "modules/std.sx";
|
||||
#import "modules/allocators.sx";
|
||||
#import "modules/std/mem.sx";
|
||||
#import "modules/compiler.sx";
|
||||
#import "modules/opengl.sx";
|
||||
#import "modules/sdl3.sx";
|
||||
|
||||
Reference in New Issue
Block a user