Replay Composition
Client Worker Project Replay
Trace one Rust execution that starts in a client module, calls a worker module, and returns a response to the caller.
Project Entry
Play the program to watch execution move from request_client.rs into request_worker.rs and then back to the entry file.
request_client.rs
Replay: real traced execution (multi-file project)
mod request_worker;
fn main() {
let command = "status";
let request_id = 42;
let response = request_worker::handle_request(command);
let ticket = request_id + command.len();
println!("ticket={}", ticket);
println!("body={}", response);
}
mod request_worker;
fn main() {
let command = "build";
let request_id = 42;
let response = request_worker::handle_request(command);
let ticket = request_id + command.len();
println!("ticket={}", ticket);
println!("body={}", response);
}
mod request_worker;
fn main() {
let command = "deploy";
let request_id = 42;
let response = request_worker::handle_request(command);
let ticket = request_id + command.len();
println!("ticket={}", ticket);
println!("body={}", response);
}
command ← "status", request_id ← 42
3fn main() {4 let comman→ "status"d = "status"; //@command="build", "deploy"5 let request_i→ 42d = 42;6 let response = request_worker::handle_request(comman"status"d);7 let ticket = request_id + command.len();response ← "service ready"
1mod request_worker;23fn main() {4 let command = "status"; //@command="build", "deploy"5 let request_id = 42;6 let response = request_worker::handle_request(command);7 let ticket = request_id + command.len();89 println!("ticket={}", ticket);10 println!("body={}", response);11}values this step"service ready"responseresponse ← "service ready", ticket ← 48
5 let request_id = 42;6 let respons→ "service ready"e = request_worker::handle_request(comman"status"d);7 let ticke→ 48t = request_i42d + command.len();89 println!("ticket={}", ticket);10 println!("body={}", response);11}outputticket=48 body=service ready
source panels
Each Rust source file has its own panel because both files participate in the same traced execution.
data flow
The Variables panel is derived from the trace: the selected command moves into the worker function, the worker chooses a response, and the caller prints it.
variants
The command selector rebuilds the traced project for each option, so the source and replay both reflect the selected command.