{"id":37231136,"url":"https://github.com/edgee-cloud/rust-sdk","last_synced_at":"2026-01-15T03:41:53.475Z","repository":{"id":236309860,"uuid":"792318110","full_name":"edgee-cloud/rust-sdk","owner":"edgee-cloud","description":"The official Rust library for the Edgee AI Gateway","archived":false,"fork":false,"pushed_at":"2026-01-12T13:55:31.000Z","size":1608,"stargazers_count":79,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-12T19:34:31.021Z","etag":null,"topics":["ai","anthropic","edge","edge-computing","edgee","gateway","llm","openai","rust"],"latest_commit_sha":null,"homepage":"https://www.edgee.cloud","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edgee-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-26T12:26:01.000Z","updated_at":"2026-01-12T13:55:33.000Z","dependencies_parsed_at":"2024-08-28T12:26:14.646Z","dependency_job_id":"6da78eae-9c92-4978-a2ad-bb6f7a8d97a5","html_url":"https://github.com/edgee-cloud/rust-sdk","commit_stats":null,"previous_names":["edgee-cloud/edgee"],"tags_count":69,"template":false,"template_full_name":null,"purl":"pkg:github/edgee-cloud/rust-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgee-cloud%2Frust-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgee-cloud%2Frust-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgee-cloud%2Frust-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgee-cloud%2Frust-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edgee-cloud","download_url":"https://codeload.github.com/edgee-cloud/rust-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgee-cloud%2Frust-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","edge","edge-computing","edgee","gateway","llm","openai","rust"],"created_at":"2026-01-15T03:41:52.904Z","updated_at":"2026-01-15T03:41:53.470Z","avatar_url":"https://github.com/edgee-cloud.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edgee Rust SDK\n\nModern, type-safe Rust SDK for the [Edgee AI Gateway](https://www.edgee.cloud).\n\n[![Crates.io](https://img.shields.io/crates/v/edgee.svg)](https://crates.io/crates/edgee)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![Rust](https://img.shields.io/badge/rust-1.75%2B-orange.svg)](https://www.rust-lang.org)\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nedgee = \"2.0\"\ntokio = { version = \"1\", features = [\"full\"] }\n```\n\n## Quick Start\n\n```rust\nuse edgee::Edgee;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let client = Edgee::from_env()?;\n\n    let response = client.send(\"gpt-4o\", \"What is the capital of France?\").await?;\n    println!(\"{}\", response.text().unwrap_or(\"\"));\n    // \"The capital of France is Paris.\"\n\n    Ok(())\n}\n```\n\n## Send Method\n\nThe `send()` method makes non-streaming chat completion requests:\n\n```rust\nlet response = client.send(\"gpt-4o\", \"Hello, world!\").await?;\n\n// Access response\nprintln!(\"{}\", response.text().unwrap_or(\"\"));      // Text content\nprintln!(\"{:?}\", response.finish_reason());         // Finish reason\nif let Some(tool_calls) = response.tool_calls() {    // Tool calls (if any)\n    println!(\"{:?}\", tool_calls);\n}\n```\n\n## Stream Method\n\nThe `stream()` method enables real-time streaming responses:\n\n```rust\nuse tokio_stream::StreamExt;\n\nlet mut stream = client.stream(\"gpt-4o\", \"Tell me a story\").await?;\n\nwhile let Some(result) = stream.next().await {\n    match result {\n        Ok(chunk) =\u003e {\n            if let Some(text) = chunk.text() {\n                print!(\"{}\", text);\n            }\n            \n            if let Some(reason) = chunk.finish_reason() {\n                println!(\"\\nFinished: {}\", reason);\n            }\n        }\n        Err(e) =\u003e eprintln!(\"Error: {}\", e),\n    }\n}\n```\n\n## Features\n\n- ✅ **Type-safe** - Leverages Rust's powerful type system\n- ✅ **Async/await** - Built on tokio for efficient async operations\n- ✅ **OpenAI-compatible** - Works with any model supported by Edgee\n- ✅ **Streaming** - First-class support with `Stream` trait\n- ✅ **Tool calling** - Full support for function calling\n- ✅ **Zero-cost abstractions** - Efficient implementation with minimal overhead\n\n## Documentation\n\nFor complete documentation, examples, and API reference, visit:\n\n**👉 [Official Rust SDK Documentation](https://www.edgee.cloud/docs/sdk/rust)**\n\nThe documentation includes:\n- [Configuration guide](https://www.edgee.cloud/docs/sdk/rust/configuration) - Multiple ways to configure the SDK\n- [Send method](https://www.edgee.cloud/docs/sdk/rust/send) - Complete guide to non-streaming requests\n- [Stream method](https://www.edgee.cloud/docs/sdk/rust/stream) - Streaming responses guide\n- [Tools](https://www.edgee.cloud/docs/sdk/rust/tools) - Function calling guide\n\n## Examples\n\nRun the examples to see the SDK in action:\n\n```bash\nexport EDGEE_API_KEY=\"your-api-key\"\ncargo run --example simple\ncargo run --example streaming\ncargo run --example tools\n```\n\n## License\n\nLicensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgee-cloud%2Frust-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgee-cloud%2Frust-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgee-cloud%2Frust-sdk/lists"}