Platforms and MSRV
The workspace declares Rust 1.85 and edition 2024.
The CI msrv job checks all workspace features and targets on Rust 1.85 with
the workspace lockfile. In a fresh consumer, keep Cargo’s Rust-version-aware
resolver defaults so it can select compatible dependencies.
Supported configurations
Section titled “Supported configurations”| Configuration | Environment | Verification |
|---|---|---|
Protocol types, server, client |
Native, custom executor | Unit, integration and doctests |
axum |
Native Tokio HTTP server | Real HTTP tests |
http |
Native reqwest HTTP client | Real HTTP tests |
Protocol, server, client, A2UI |
wasm32-unknown-unknown |
Compilation and dependency checks for selected features |
A wasm compile does not prove browser execution of the Rust SDK. No browser transport is shipped; supply one yourself. Review Desk’s TypeScript renderer checks are separate.
Separate execution from transport
Section titled “Separate execution from transport”The normal dependency graphs of server and client alone contain no Tokio.
Enabling axum or http brings Tokio in. HTTP is opt-in.
use ag_ui::client::transport::{Transport, TransportFuture, TransportStream};use ag_ui::client::Result;use ag_ui::{Event, RunAgentInput};use futures_util::stream;
/// Replays a fixed script — the shape a browser transport built on `fetch`/// and `EventSource` would also take.struct Canned(Vec<Event>);
impl Transport for Canned { // Failing to connect is an error from the future; failing mid-stream is an // error item in the stream. That split is the whole interface. fn run(&self, _input: RunAgentInput) -> TransportFuture { let events: Vec<Result<Event>> = self.0.iter().cloned().map(Ok).collect(); Box::pin(async move { Ok(TransportStream::typed(stream::iter(events))) }) }}This is a replay transport example. In a browser, replace it with an implementation that
sends POST requests and hands the response on with TransportStream::json. TransportFuture
and the stream a TransportStream takes require Send on native targets and omit that bound on wasm.
Check locally
Section titled “Check locally”cargo check -p ag-ui --target wasm32-unknown-unknown --no-default-features --features client,ssecargo check -p ag-ui-a2ui --target wasm32-unknown-unknown --all-featurescargo tree -p ag-ui --no-default-features --features server -e normalcargo tree -p ag-ui --no-default-features --features client -e normalInstall the target with rustup target add wasm32-unknown-unknown first.
In addition to compilation, CI asserts Tokio is absent from the relevant normal dependency graphs.
That guarantee excludes dev-dependencies and HTTP configurations.
See Feature flags for the complete configurations.