Expand description
day-script: the embedded dayscript engine (DESIGN.md §14). Bind-only-when-invited: the server starts only when DAYSCRIPT_PORT + DAYSCRIPT_TOKEN are present in the environment (never otherwise), listens on 127.0.0.1, and accepts only the step catalog. Steps execute as synthesized Day events on the main thread between flushes, deterministic and toolkit-uniform. Locator steps get an implicit bounded wait (default 5s).
Re-exports§
pub use record::play;
Modules§
- conformance
- The in-app test runner behind
day test(docs/testing.md). The in-app test runner (docs/testing.md): runs the#[day::test]cases the binary registers, each drive op as the dayscript step it names, and answers thetestsandrun_testsstepsday testsends. A run is one main-loop task: between a drive’s awaited ops the app’s loop turns, so a native transition settles and a capture paints exactly as they do between a script’s steps. - png
- The PNG reader behind
sample_pixel(docs/testing.md). A small PNG reader for thesample_pixelstep (docs/testing.md): the in-process capture arrives as PNG bytes, and a test asks for the color of one point of it. It reads the formats a window capture is written in, 8- and 16-bit gray, gray-alpha, RGB and RGBA, non-interlaced, into RGBA8, with its own inflate (RFC 1951) rather than a dependency: this engine is linked into every app, and the reader is a few hundred lines. - record
- The dayscript recorder and in-process playback (§14.6): capture the events an app
receives back into a replayable dayscript, and replay one against the live UI. See
record::start/record::play. The dayscript recorder (DESIGN.md §14.6): the inverse of playback. Where the engine turns a script into synthesized Day events, the recorder turns the events an app receives back into a script. It hooks one point,day_core::set_event_observer, which every backend funnels its native events through (day_core::enqueue_events), so it needs no per-toolkit code, and it emits an ordinary dayscript that replays cross-toolkit through the same executor as any hand-written one.
Structs§
Enums§
- Dialog
Mode - Native UI integration or deterministic Day request/response testing.
- Step
Constants§
- DEFAULT_
MAIN_ TIMEOUT_ SECS - How long one dispatch may wait for the main thread before the step is failed.
- DEFAULT_
TIMEOUT_ SECS - Default implicit-wait budget, in seconds.