allwright-core Rust crate
allwright-core is the lightweight Rust engine core for the project.
It includes:
- a high-level Rust client API for talking to the allwright engine
- the engine server implementation used by the installable
allwrightCLI - the shared plugin catalog used by CLI-side plugin registration
The surrounding Rust workspace now also publishes:
allwrightallwright-plugin-sdkallwright-surface-weballwright-surface-mobileallwright-surface-mobile-androidallwright-surface-mobile-iosallwright-surface-desktopallwright-surface-desktop-macallwright-surface-desktop-windowsallwright-surface-desktop-linux
Installing the allwright package is intended to provide the CLI plus this lightweight core together, while surface crates are added separately as plugins.
Runnable client examples include web_basic, android_basic, and ios_basic:
Typed hooks use one generic registration/wait lifecycle. For example, register the web-owned new-page hook before the action that opens a tab:
let hook = page.register_hook.await?;
page.click.await?;
let new_page = hook.wait.await?;
let hook = page.register_hook.await?;
page.click.await?;
let chooser = hook.wait.await?;
chooser.set_file.await?;
let hook = page.register_hook.await?;
page.click.await?;
let download = hook.wait.await?;
download
.save_as
.await?;
These paths are local to the Rust test process and are streamed through a
remote Allwright server when necessary. Android app contexts expose the same
register_hook(FILE_CHOOSER) / register_hook(DOWNLOAD) lifecycle and return
mobile chooser/download handles.
Web state reads: page.url().await, locator.input_value().await, locator.selected_options().await, locator.selected_text().await, locator.is_checked().await, locator.get_attribute(name).await, and locator.bounding_box().await. Element methods also accept selectors on Page; _with_options variants accept CommandOptions. Selected options return Vec<CapturedOption>; boxes return Option<BoundingBox> in frame/page viewport CSS pixels. Missing attributes, unsupported text selections, and hidden/zero-area boxes return None. Existing text_content() and inner_text() read element text. See the shared semantics.