Skip to content

Libraries

A library has no process to replay: its public API is the front door, and each unit's recorded cases are the proof.

sh
rust-anything app front-door .        # rust/app: a Rust crate with the public API
# each unit through the loop: bridge, record, port.rs, build, diff, gate; then:
rust-anything app wire . textkit-rs   # re-exported from rust/app; the original imports its shadow
rust-anything app replay .            # every wired unit's cases; fallback = exports still in the original
rust-anything app lift .
  • app front-door finds the public API (every unit's exports) when the repository has no main and no server (--library otherwise), and scaffolds rust/app as a library crate. Each wired unit becomes a module of it: pub use textkit_rs::port as textkit;.
  • app wire takes a crate made by bridge, runs gate, and writes the unit's shadow drop-in: the original package imports it in place of the unit, so its callers keep the original API and reach the Rust. RUST_ANYTHING_UNIT_<NAME>=original sends the unit back (C: build without the shadow's flags).
  • app replay runs every wired unit's recorded cases through its bindings. The fallback rate is the share of public exports Rust does not answer yet: unwired units, and exports bridge keeps in the original language.
  • app lift needs fallback 0 and every unit through gate; it strips the bindings, wrappers and shadows from the units and leaves rust/app as one pure Rust library. It does not touch any port.rs, so the cases that matched through the bindings still describe it; the checklist warns about files of the original that still import the shadows.

All five are MCP tools too: app_record, app_replay, app_front_door, app_wire and app_lift.

Edit this page on GitHub →