Expand description
rudzio-migrate — best-effort converter of cargo-style Rust tests
into rudzio tests. This module exposes the internals as a library
so the thin src/main.rs binary and the integration test harness
can both reach them.
Modules§
- backup
- File backups written immediately before the tool overwrites an existing file.
- cli
- Hand-rolled argv parser. Kept small on purpose: no clap dependency for a binary whose surface is five flags.
- detect
- Test-attribute classification.
- discovery
- Discovery: given the repo root, enumerate every Rust source file that belongs to a Cargo package in this workspace and could plausibly contain tests.
- emit
- Read → parse → mutate → emit pipeline for a single Rust source file.
- manifest
- Cargo.toml edits via
toml_edit. Preserves comments, key order, and whitespace outside the regions we touch. - phrase
- The exact acknowledgement phrase the user must type before the tool will touch any file.
- preflight
- Preflight gates that must pass before the tool touches any file.
- report
- Summary report: what got migrated, what got warned, what got skipped.
- rewrite
- Source rewriter.
- run
- Top-level orchestration. Lives here so
src/main.rscan stay a trivial binary and the lib-based callers (integration tests, a hypothetical library user) can drive the same flow. - runner_
scaffold - Shared-runner scaffolding: create or append
tests/main.rswith a#[rudzio::main] fn main() {}entry. - test_
context #[test_context(T)]migration.