Why did the robot reroute?

Run an application, then ask a question you did not think to log.

Watch a delivery

Try the warehouse in your browser, or install Wax and run:

wax new warehouse --example warehouse
cd warehouse
wax run --record first-run.wxs

Native Release runs need no separately installed C compiler or Node on macOS ARM64, Linux x64/ARM64, and Windows x64. The terminal draws the floor: R is the robot, # the blocked aisle, P the pickup, and D the delivery. It finishes in eight frames with battery 68 and one reroute.

Ask after the run

Open Inspector and choose first-run.wxs. The recording contains the source that produced it. Compare frames 2 and 3 in the timeline: the loaded robot at (3, 0) moves left because (3, 1) is blocked. Inspect robotX, robotY, battery, and reroutes.

Choose Investigate, then Open editor under New query. Replace the stub with this query, choose Whole recording, and press Run:

import reroutes from warehouse;

query fn Untitled1() : int32 {
    return reroutes;
}

The count changes from 0 to 1 at frame 3. You added this question after the application finished; the original source needed no new logging.

Compare a change

In Src/App.wax, change the body of IsBlocked to return false; and run:

wax run --record clear-aisle.wxs

Open the second recording in Inspector. The clear aisle takes six frames, leaves battery 76, and has no reroutes. Keep the first recording open for comparison: its source and state remain unchanged. Wax refuses to overwrite an existing recording name.

Take the next step

Continue with the language tutorial, or explore the Doom investigation.

When you want an executable to share, use wax build. Export currently needs a Clang-compatible compiler and platform linker. Ship the complete Generated/ directory together; the recipient needs neither Wax nor a C compiler.