# Progress log — P1 (Leaf / pure utils) See [PLAN.md](../../PLAN.md) for the phase table and migration model. - **2026‑06‑02 — P1 (Leaf / pure utils) merged.** New library crate **`ircd-common`** holds the ports (`#[no_mangle] pub extern "C"`, exact `*_ext.h` signatures); `ircd-rs` + `ircd-testkit` depend on it via a `link_anchor()`. Ported & dropped from the C link set: `match.c` (5 fns + 3 tables), `dbuf.c` (8 fns + `poolsize`/`freelist`), and a pure subset of `support.c` (`mystrdup`, `strtoken`, `myctime`, `mybasename`, `inetntop`, `inetpton`, `irc_memcmp`). - **Seam wiring (resolves P0c's deferred task):** `ircd-sys/build.rs` now splits `CREF_OBJS` (full set → feeds the `cref_*` oracle) from the link set (`CREF_OBJS \ PORTED`, with `support.o`→`support_link.o` substitution). `support.c` is partially ported via inert `#ifndef PORT_SUPPORT_P1` guards + a second compile, leaving the pristine reference build and the oracle untouched. - **Scope corrections vs. original plan:** `irc_sprintf.c` + `snprintf_append` moved to **P8** (variadic `va_arg`, unportable on stable Rust, no post‑format core); `dgets`/`make_isupport`/`ipv6string` left C (not pure leaves). `dbuf_copy` is dead/commented‑out C (not a compiled symbol) → not ported. - **Verification:** `cargo build` warning‑free; all L1 + layout tests green; `match`/`dbuf_*`/`mystrdup`/`irc_memcmp` resolve to Rust in `libircd_c.a` while `cref_*` remain in `libcref.a`. Spec: `docs/superpowers/specs/2026-06-02-p1-leaf-utils-design.md`; plan: `docs/superpowers/plans/2026-06-02-p1-leaf-utils.md`. - **Faithfulness notes (caught in review):** reproduced `match()`'s always‑active `MAX_ITERATIONS 512` cap; `dbuf_get` mirrors C's `&&` short‑circuit (avoids `dbuf_map`'s `tail` side effect); `dbuf` `poolsize` hard‑codes the compile‑time `(BUFFERPOOL>1500000)?…:1500000` value (correct for this config, pinned by an L1 test); `irc_memcmp` = unsigned byte compare (only the sign is observable); `istat` externed from C, not redefined.