rename std/build.sx -> modules/compiler.sx (the compiler-API surface)
Per user direction: the low-level abi(.compiler) primitive surface is the comptime 'compiler' library, so name the file compiler.sx (a peer of build.sx) instead of the interim std/build.sx — which also frees the 'build' name for the default build IMPLEMENTATION (default_build + on_build slot), which will live in modules/build.sx alongside the BuildOptions DSL. Updated the two example imports + the plan's Phase 5 file-split note. 704/0 both gates.
This commit is contained in:
@@ -88,7 +88,7 @@ with ONE welded mechanism. Branch: `reify` (off `master`). Update after every st
|
||||
> bails on legacy with `struct_get`); build succeeds (exit 0) only via the VM. `flushInterpOutput` deleted (VM
|
||||
> writes `out` direct via host-FFI). **702/0 both gates.** **P5.2 metadata queries DONE (2026-06-19, newest Log
|
||||
> entry):** `c_object_paths() -> List(string)` + `link_libraries() -> List(string)` are `abi(.compiler)` primitives
|
||||
> (new stdlib home `library/modules/std/build.sx`), serviced by `comptime_vm.callCompilerFn` reading `BuildConfig`
|
||||
> (new stdlib home `library/modules/compiler.sx`), serviced by `comptime_vm.callCompilerFn` reading `BuildConfig`
|
||||
> fields `main.zig` forwards (`c_object_paths`/`link_libraries`). New reusable VM helper `makeStringList` builds a
|
||||
> `List(string)` in flat memory (target-aware via the result type's offsets); `invoke`/`callCompilerFn` now thread
|
||||
> the call's result type (`ins.ty`). Legacy handlers bail loudly (VM-only by nature — post-link). Smoke test
|
||||
@@ -424,7 +424,7 @@ when reached (sentinels or accessor fns; see the design doc Risks).
|
||||
## Log
|
||||
- **P5.2b (`link` ACTION) — the sx `link` primitive links on the VM via a host-installed vtable; build callback de-failable'd (2026-06-19).**
|
||||
Phase 5's one genuine ACTION primitive: `link(objects, output, libraries, frameworks, flags, target)` (in
|
||||
`library/modules/std/build.sx`). **USER DECISION this step: drop fallibility from the build callback** — so
|
||||
`library/modules/compiler.sx`). **USER DECISION this step: drop fallibility from the build callback** — so
|
||||
`link` is a plain VOID primitive (no `-> !`), and a link failure BAILS on the VM → hard build error (sidesteps
|
||||
the failable-tuple-return construction entirely). **The vtable:** `comptime_vm.zig` can't depend on the driver
|
||||
(`core`/`main`/`target`), so `link` dispatches through a new `compiler_hooks.BuildHooks { ctx, link_fn }` that
|
||||
@@ -444,7 +444,7 @@ when reached (sentinels or accessor fns; see the design doc Risks).
|
||||
- **P5.2 (metadata queries) — `c_object_paths` / `link_libraries` compiler primitives + the VM `List(string)` builder (2026-06-19).**
|
||||
Phase 5 step 2 (the read-only slice): two `abi(.compiler)` primitives that the sx build driver will pass to
|
||||
`link` — `c_object_paths() -> List(string)` (the `#import c` companion `.o`s) and `link_libraries() -> List(string)`
|
||||
(the `#library` names). They live in a NEW stdlib file `library/modules/std/build.sx` (the Phase 5 home the sx
|
||||
(the `#library` names). They live in a NEW stdlib file `library/modules/compiler.sx` (the Phase 5 home the sx
|
||||
`default_build` grows into) and are serviced by `comptime_vm.callCompilerFn` reading two new `BuildConfig`
|
||||
fields (`c_object_paths`/`link_libraries`) that `main.zig` forwards before the post-link callback (alongside
|
||||
`binary_path`/`target_triple`/…). **Reusable new piece:** `Vm.makeStringList(table, list_ty, items)` builds a
|
||||
|
||||
Reference in New Issue
Block a user