[package]
edition = "2021"
rust-version = "1.88"
name = "rust-genai"
version = "0.2.0"
authors = ["Rust Gemini SDK Team"]
build = false
exclude = [
"examples/files/output/**",
"**/.DS_Store",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust SDK for the Google Gemini API and Vertex AI"
homepage = "https://github.com/rust-genai/rust-genai"
documentation = "https://docs.rs/rust-genai"
readme = "README.md"
keywords = [
"gemini",
"ai",
"google",
"llm",
"api",
]
categories = [
"api-bindings",
"asynchronous",
]
license = "Apache-2.0"
repository = "https://github.com/rust-genai/rust-genai"
[features]
default = []
kitoken = [
"dep:kitoken",
"dep:sha2",
]
mcp = [
"dep:rmcp",
"rust-genai-types/mcp",
]
[lib]
name = "rust_genai"
path = "src/lib.rs"
[[example]]
name = "auth_tokens_create"
path = "examples/auth_tokens_create.rs"
[[example]]
name = "batches_create"
path = "examples/batches_create.rs"
[[example]]
name = "batches_list"
path = "examples/batches_list.rs"
[[example]]
name = "caches_create"
path = "examples/caches_create.rs"
[[example]]
name = "caches_list"
path = "examples/caches_list.rs"
[[example]]
name = "chat_basic"
path = "examples/chat_basic.rs"
[[example]]
name = "chat_history"
path = "examples/chat_history.rs"
[[example]]
name = "chat_stream"
path = "examples/chat_stream.rs"
[[example]]
name = "code_execution_with_image"
path = "examples/code_execution_with_image.rs"
[[example]]
name = "compute_tokens"
path = "examples/compute_tokens.rs"
[[example]]
name = "computer_use_tools"
path = "examples/computer_use_tools.rs"
[[example]]
name = "count_tokens"
path = "examples/count_tokens.rs"
[[example]]
name = "deep_research_basic"
path = "examples/deep_research_basic.rs"
[[example]]
name = "documents_list"
path = "examples/documents_list.rs"
[[example]]
name = "embed_content"
path = "examples/embed_content.rs"
[[example]]
name = "error_handling"
path = "examples/error_handling.rs"
[[example]]
name = "file_search_store_create"
path = "examples/file_search_store_create.rs"
[[example]]
name = "file_search_store_upload"
path = "examples/file_search_store_upload.rs"
[[example]]
name = "files_download"
path = "examples/files_download.rs"
[[example]]
name = "files_list"
path = "examples/files_list.rs"
[[example]]
name = "files_upload_from_path"
path = "examples/files_upload_from_path.rs"
[[example]]
name = "function_calling_auto"
path = "examples/function_calling_auto.rs"
[[example]]
name = "function_response_media"
path = "examples/function_response_media.rs"
[[example]]
name = "generate_content_basic"
path = "examples/generate_content_basic.rs"
[[example]]
name = "generate_content_image"
path = "examples/generate_content_image.rs"
[[example]]
name = "generate_content_stream"
path = "examples/generate_content_stream.rs"
[[example]]
name = "generate_images"
path = "examples/generate_images.rs"
[[example]]
name = "generate_videos"
path = "examples/generate_videos.rs"
[[example]]
name = "grounding_citations"
path = "examples/grounding_citations.rs"
[[example]]
name = "interactions_basic"
path = "examples/interactions_basic.rs"
[[example]]
name = "list_models"
path = "examples/list_models.rs"
[[example]]
name = "live_function_calling"
path = "examples/live_function_calling.rs"
[[example]]
name = "live_music_generation"
path = "examples/live_music_generation.rs"
[[example]]
name = "live_native_audio"
path = "examples/live_native_audio.rs"
[[example]]
name = "live_session_basic"
path = "examples/live_session_basic.rs"
[[example]]
name = "live_session_resumption"
path = "examples/live_session_resumption.rs"
[[example]]
name = "live_voice_chat"
path = "examples/live_voice_chat.rs"
[[example]]
name = "mcp_basic"
path = "examples/mcp_basic.rs"
[[example]]
name = "operations_wait"
path = "examples/operations_wait.rs"
[[example]]
name = "recontext_image"
path = "examples/recontext_image.rs"
[[example]]
name = "segment_image"
path = "examples/segment_image.rs"
[[example]]
name = "timeout_and_proxy"
path = "examples/timeout_and_proxy.rs"
[[example]]
name = "tts_multispeaker"
path = "examples/tts_multispeaker.rs"
[[test]]
name = "api_smoke_callable_tools"
path = "tests/api_smoke_callable_tools.rs"
[[test]]
name = "api_smoke_gemini"
path = "tests/api_smoke_gemini.rs"
[[test]]
name = "api_smoke_vertex"
path = "tests/api_smoke_vertex.rs"
[[test]]
name = "batches_api"
path = "tests/batches_api.rs"
[[test]]
name = "caches_api"
path = "tests/caches_api.rs"
[[test]]
name = "chats_api"
path = "tests/chats_api.rs"
[[test]]
name = "client_http"
path = "tests/client_http.rs"
[[test]]
name = "documents_api"
path = "tests/documents_api.rs"
[[test]]
name = "file_search_stores_api"
path = "tests/file_search_stores_api.rs"
[[test]]
name = "files_api"
path = "tests/files_api.rs"
[[test]]
name = "http_retry"
path = "tests/http_retry.rs"
[[test]]
name = "interactions_api"
path = "tests/interactions_api.rs"
[[test]]
name = "live_ws"
path = "tests/live_ws.rs"
[[test]]
name = "model_capabilities"
path = "tests/model_capabilities.rs"
[[test]]
name = "models_api"
path = "tests/models_api.rs"
[[test]]
name = "operations_api"
path = "tests/operations_api.rs"
[[test]]
name = "tokens_api"
path = "tests/tokens_api.rs"
[[test]]
name = "tunings_api"
path = "tests/tunings_api.rs"
[dependencies.base64]
version = "0.22"
[dependencies.bytes]
version = "1.11"
[dependencies.futures-util]
version = "0.3"
[dependencies.google-cloud-auth]
version = "1.3"
[dependencies.http]
version = "1.4"
[dependencies.kitoken]
version = "0.10"
features = ["convert-sentencepiece"]
optional = true
[dependencies.memchr]
version = "2.7"
[dependencies.mime_guess]
version = "2.0"
[dependencies.reqwest]
version = "0.12"
features = [
"json",
"stream",
"rustls-tls-native-roots",
]
default-features = false
[dependencies.rmcp]
version = "0.12"
features = [
"client",
"transport-child-process",
]
optional = true
[dependencies.rust-genai-types]
version = "0.2.0"
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_json]
version = "1.0"
[dependencies.sha2]
version = "0.10"
optional = true
[dependencies.thiserror]
version = "2.0"
[dependencies.tokio]
version = "1.48"
features = ["full"]
[dependencies.tokio-tungstenite]
version = "0.28"
features = ["rustls-tls-native-roots"]
[dev-dependencies.criterion]
version = "0.8"
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.wiremock]
version = "0.6"