ww: separate package identity from declared name

This commit is contained in:
2026-08-14 03:07:58 +09:00
parent 028da6323e
commit 6efe9b70d4
37 changed files with 1678 additions and 886 deletions

View File

@@ -4,12 +4,9 @@
package os;
import time;
// [[args]] allocates the []str view via the `alloc` builtin, whose malloc
// lowers to rt_malloc only when the rt binding is in the bundle (mirror
// lib/strings/strings.ww:30 — every alloc-using module imports rt). os is
// bundled by ~every program, so without this a plain `ww build` of any
// os-importing program links bare libc `malloc` (undefined). Task #17.
import rt;
// [[args]] allocates the []str view via the `alloc` builtin. Package-mode
// lowering targets the runtime ABI directly; no source import is needed merely
// to trigger a linker choice, so the dependency graph remains source-semantic.
@symbol("rt_syscall") fn syscall0(num: nr) i64;
@symbol("rt_syscall") fn syscall1(num: nr, a: i64) i64;

View File

@@ -20,7 +20,6 @@
package os_test;
import os;
import rt;
import test;