iter raw-buf.2-kernel-rename (DONE 2/2): ailang-kernel-stub → ailang-kernel family-crate (refs #7)
Pure crate rename, zero behavioural change. ailang-kernel-stub becomes
the ailang-kernel family-crate: a re-export hub (src/lib.rs) plus one
submodule per kernel-tier module (today only kernel_stub:
src/kernel_stub/{mod.rs, source.ail}). raw-buf.3 plugs raw_buf in as a
sibling submodule; this iter only builds the home.
Task 1 (atomic — the rename breaks the build until every site is
threaded):
- git mv crates/ailang-kernel-stub → crates/ailang-kernel.
- Carved the STUB_AIL Form-A body verbatim (byte-identical, verified
via diff against HEAD's raw string) into src/kernel_stub/source.ail,
loaded by mod.rs via include_str!. The answer (intrinsic) fn is
byte-preserved — its INTERCEPTS bijection partner stays pinned.
- lib.rs is now the hub: `pub use kernel_stub::SOURCE as STUB_AIL;`.
The public symbol STUB_AIL is preserved, so ailang-surface and the
bijection test bind to it unchanged.
- 8 compile sites threaded across 6 files: Cargo package name,
workspace member + dep-alias, ailang-surface dep, loader.rs
use-paths (ailang_kernel_stub → ailang_kernel). Cargo.lock
auto-regenerated.
Task 2 (doc/ledger honesty, no build impact):
- design/INDEX.md, CLAUDE.md code-layout row + lockstep-pair row,
design/models/0007 ×2 — crate-path strings updated to the new
ailang-kernel/src/kernel_stub path.
- Scope note: the spec's raw-buf.2 Components row named only
design/INDEX.md + the CLAUDE.md code-layout row. plan-recon found two
more present-tense crate-path refs (CLAUDE.md:312 lockstep row,
model 0007:8/235). Folded them in per the honesty-rule — a rename
that leaves stale present-state paths is an incomplete rename.
Path-only; the retirement narrative stays for raw-buf.4.
The AILang module name kernel_stub (the Form-A string + parse_kernel_stub
fn) is deliberately unchanged — only the crate identifier moved.
Verification (orchestrator, this session): cargo build --workspace
clean; cargo test --workspace 669 passed / 0 failed / 2 ignored
(baseline held exactly — no test added/removed). Carve byte-identity
confirmed by diff; no stale ailang-kernel-stub / ailang_kernel_stub
refs remain in-tree (git grep, excl. history + lockfile). The four
rename-invisible ratifiers (kernel_stub_module_round_trips,
intercepts_bijection_with_intrinsic_markers, .ll snapshots,
workspace_pin) all green via the preserved re-export.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//! Kernel-stub submodule — minimal ratifying fixture for the
|
||||
//! kernel-extension-mechanics milestone (prep.3). The Form-A text
|
||||
//! lives in the sibling `source.ail`.
|
||||
//!
|
||||
//! No domain content. Retired when the `raw-buf` milestone lands
|
||||
//! its real kernel-tier consumer (raw-buf.4); until then it stays
|
||||
//! as the ratifying-fixture anchor.
|
||||
|
||||
/// Source-of-truth Form-A text for the stub kernel module. Parsed
|
||||
/// by `ailang_surface::parse_kernel_stub` (and round-trip-pinned by
|
||||
/// `kernel_stub_module_round_trips` in `design_schema_drift.rs`).
|
||||
///
|
||||
/// Ships a `(fn new ...)` def so consumers can spell `(new StubT 42)`
|
||||
/// (Term::New end-to-end, per prep.3 fieldtest F4) and an `answer`
|
||||
/// `(intrinsic)` fn whose `INTERCEPTS` entry the bijection test pins.
|
||||
pub const SOURCE: &str = include_str!("source.ail");
|
||||
@@ -0,0 +1,15 @@
|
||||
(module kernel_stub
|
||||
(kernel)
|
||||
(data StubT (vars a)
|
||||
(ctor Stub a)
|
||||
(param-in (a Int Float)))
|
||||
(fn new
|
||||
(doc "Construct StubT<Int> from an Int. Exercises Term::New end-to-end.")
|
||||
(type (fn-type (params (con Int)) (ret (con StubT (con Int)))))
|
||||
(params x)
|
||||
(body (term-ctor StubT Stub x)))
|
||||
(fn answer
|
||||
(doc "Ratifies the intrinsic mechanism end-to-end: codegen intercept answer emits ret i64 42.")
|
||||
(type (fn-type (params) (ret (con Int))))
|
||||
(params)
|
||||
(intrinsic)))
|
||||
@@ -0,0 +1,13 @@
|
||||
//! Kernel-tier modules — family-crate hosting the Form-A source of
|
||||
//! every kernel-tier `.ail` module the AILang workspace
|
||||
//! auto-injects. One Cargo crate, one Rust submodule per
|
||||
//! kernel-tier module, one `pub const SOURCE` per submodule.
|
||||
//!
|
||||
//! The acyclic dependency chain is preserved:
|
||||
//! `ailang-surface → ailang-kernel → ailang-core`. Per-module parse
|
||||
//! hops live in `ailang-surface` (`parse_kernel_stub`, …) so this
|
||||
//! crate carries zero parser code.
|
||||
|
||||
mod kernel_stub;
|
||||
|
||||
pub use kernel_stub::SOURCE as STUB_AIL;
|
||||
Reference in New Issue
Block a user