Skip to content

Update README and guide for Rust SDK#1259

Merged
stephentoub merged 1 commit into
mainfrom
stephentoub/update-readme-rust
May 11, 2026
Merged

Update README and guide for Rust SDK#1259
stephentoub merged 1 commit into
mainfrom
stephentoub/update-readme-rust

Conversation

@stephentoub
Copy link
Copy Markdown
Collaborator

Rust is now published as an official SDK crate, so the root documentation and getting-started walkthrough should present it alongside the other SDKs rather than as a community-maintained project.

Summary

  • Add Rust to the root README language list, SDK table, badges, CLI installation guidance, and SDK guidance links.
  • Remove Rust from the unofficial community SDK table.
  • Clarify that Go and Rust do not bundle the CLI by default, but both have opt-in application-level bundling paths.
  • Add Rust examples throughout the Getting Started guide, including install, first message, streaming, event subscriptions, custom tools, interactive assistant, external server, telemetry, and reference links.

Validation

  • cargo check --features derive --examples
  • Compiled representative Rust Getting Started snippets in a temporary crate against the in-tree Rust SDK.
  • Ran docs extraction; full docs validation was blocked in this environment because python is not available on PATH.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 11, 2026 16:32
@stephentoub stephentoub requested a review from a team as a code owner May 11, 2026 16:32
@stephentoub stephentoub merged commit 4a0437b into main May 11, 2026
17 checks passed
@stephentoub stephentoub deleted the stephentoub/update-readme-rust branch May 11, 2026 16:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the root documentation and Getting Started guide to present the Rust SDK as an official, published crate alongside the other first-party SDKs, including adding Rust-specific install and usage examples throughout the walkthrough.

Changes:

  • Add Rust to the root README (badges, SDK table, CLI installation notes, and guidance links) and remove it from the community SDK list.
  • Extend docs/getting-started.md with Rust examples for install, basic usage, streaming, event subscription, custom tools, interactive assistant, external server connection, telemetry, and reference links.
  • Refresh the documented runtime minimums (Node 20+, Go 1.24+, Rust 1.94+).
Show a summary per file
File Description
README.md Adds Rust as a first-party SDK in the main landing documentation and updates CLI/bundling guidance accordingly.
docs/getting-started.md Adds Rust sections and code samples across the end-to-end Getting Started walkthrough (including streaming/tools/telemetry).

Copilot's findings

Comments suppressed due to low confidence (3)

docs/getting-started.md:783

  • This Rust event-subscription snippet uses while let Ok(event) = events.recv().await, which stops consuming events if the subscription ever returns RecvError::Lagged(...) (a recoverable error indicating dropped events). Please handle Lagged by continuing the loop (and optionally logging skipped count), and only break on Closed.
tokio::spawn(async move {
    while let Ok(event) = events.recv().await {
        println!("Event: {}", event.event_type);

        match event.event_type.as_str() {

docs/getting-started.md:1128

  • In the Rust custom-tools example, the spawned subscriber loop exits on RecvError::Lagged(...) because it uses while let Ok(event) = events.recv().await. Since lag is expected/handled by the subscription API, the example should continue on Lagged and only stop on Closed, otherwise streaming output may stop unexpectedly.
    tokio::spawn(async move {
        while let Ok(event) = events.recv().await {
            match event.event_type.as_str() {
                "assistant.message_delta" => {
                    if let Some(text) =

docs/getting-started.md:1594

  • The Rust interactive assistant example’s event loop uses while let Ok(event) = events.recv().await, which will terminate on RecvError::Lagged(...) (recoverable) and stop printing deltas. Consider handling Lagged by continuing the loop (optionally logging it) and breaking only on Closed.
    tokio::spawn(async move {
        while let Ok(event) = events.recv().await {
            match event.event_type.as_str() {
                "assistant.message_delta" => {
                    if let Some(text) =
  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread docs/getting-started.md
Comment on lines +523 to +534
while let Ok(event) = events.recv().await {
match event.event_type.as_str() {
"assistant.message_delta" => {
if let Some(text) =
event.data.get("deltaContent").and_then(|value| value.as_str())
{
print!("{text}");
io::stdout().flush().ok();
}
}
"assistant.message" => println!(),
_ => {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants