refactor(app): clarify application and binary roles

Rename the application Cargo package from irtt-cli to irtt-rs
(crates/irtt-cli -> crates/irtt-app), and hard-rename its scriptable
client binary from irtt-cli to irtt-client, now that the application
also ships a first-class server and the old name reads as an umbrella
CLI for both roles.

Give each dedicated binary (irtt-client, irtt-tui, irtt-server) its
own entry point instead of funneling through the multicall
dispatcher's argv0/subcommand logic, so a dedicated binary only links
the applet code for the role it implements and always runs that role
regardless of the name it's invoked or copied under. irtt-rs remains
the feature-selectable multicall dispatcher and is now the only binary
that inspects argv0 or subcommands.

Move future application releases to the irtt-rs/vX.Y.Z tag namespace
(regenerated via `dist generate`), and bump the application package to
0.6.0 as a breaking distribution change. Library crate versions are
unaffected.
This commit is contained in:
Nils Andreas Svee committed 2026-08-20 11:44:35 +07:00
1 parent 7129ee0bc5
commit 7bea3dd54e
49 files changed
+365 -213

No files matched your search

+5 -5
View File
@@ -32,7 +32,7 @@ DEFAULT_REMOTE_TARGETS = [
]
DEFAULT_LOCAL_TARGET = ("127.0.0.1", "10s", "100ms", "local")
DEFAULT_OUTPUT_ROOT = Path("target/interop-comparisons")
DEFAULT_IRTT_RS_COMMAND = "target/debug/irtt-cli"
DEFAULT_IRTT_RS_COMMAND = "target/debug/irtt-client"
@dataclass
@@ -163,7 +163,7 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--skip-build",
action="store_true",
help="Do not run cargo build -p irtt-cli before comparisons.",
help="Do not run cargo build -p irtt-rs --bin irtt-client before comparisons.",
)
parser.add_argument(
"--localhost-port",
@@ -335,8 +335,8 @@ def check_local_server(args: argparse.Namespace) -> tuple[bool, str]:
)
def preflight_build_irtt_cli(run_dir: Path) -> bool:
command = ["cargo", "build", "-p", "irtt-cli"]
def preflight_build_irtt_client(run_dir: Path) -> bool:
command = ["cargo", "build", "-p", "irtt-rs", "--bin", "irtt-client"]
started = utc_now()
print(f"[{started}] preflight build: {shlex.join(command)}", flush=True)
completed = subprocess.run(
@@ -1117,7 +1117,7 @@ def main() -> int:
print(message, file=sys.stderr)
cases = [case for case in cases if not case.is_local]
if cases and not args.skip_build and not preflight_build_irtt_cli(run_dir):
if cases and not args.skip_build and not preflight_build_irtt_client(run_dir):
write_index(run_dir, [], local_error)
return 1
+7 -4
View File
@@ -105,13 +105,13 @@ def parse_args() -> argparse.Namespace:
)
parser.add_argument(
"--irtt-rs-command",
default=str(REPO_ROOT / "target" / "debug" / "irtt-cli"),
help="Path or command for irtt-rs client (default: target/debug/irtt-cli).",
default=str(REPO_ROOT / "target" / "debug" / "irtt-client"),
help="Path or command for irtt-rs client (default: target/debug/irtt-client).",
)
parser.add_argument(
"--skip-build",
action="store_true",
help="Do not run cargo build -p irtt-cli before comparisons.",
help="Do not run cargo build -p irtt-rs --bin irtt-client before comparisons.",
)
parser.add_argument(
"--sudo",
@@ -176,7 +176,10 @@ def main() -> int:
upstream_irtt = resolve_command(args.upstream_irtt)
irtt_rs_command = resolve_irtt_rs_command(args.irtt_rs_command)
if not args.skip_build:
run_checked(["cargo", "build", "-p", "irtt-cli"], run_dir / "cargo-build")
run_checked(
["cargo", "build", "-p", "irtt-rs", "--bin", "irtt-client"],
run_dir / "cargo-build",
)
cleanup(args, quiet=True)
setup_namespaces(args, run_dir)