google-cloud-rust

repository·main·Indexed 21 days ago

https://github.com/googleapis/google-cloud-rust

Idiomatic Rust client libraries for Google Cloud Platform services, providing high-performance and type-safe access to various Google Cloud APIs. The SDK includes crates for BigQuery, Bigtable, Datastore, and Firestore, as well as authentication via google-cloud-auth. Requires Rust version 1.88 or higher.

Tokens
95.2K
Snippets
286
Records
422
Agent score
75%

What's inside google-cloud-rust

  1. Overview of Google Cloud Client Libraries for Rust

    main

    The Google Cloud Client Libraries for Rust is a collection of specialized Rust crates designed to allow developers to interact with various Google Cloud Services.

    Because most Google Cloud services follow the AIPs (API Improvement Proposals), the client libraries maintain a high degree of consistency. You can expect similar interfaces for common operations, such as deleting or listing resources, across different service crates.

  2. Overview of Google Cloud Datastore client library for Rust

    main

    The google-cloud-datastore crate provides the client library for interacting with Google Cloud Datastore.

    Warning: This crate is currently under active development. It is subject to frequent breaking changes and incomplete testing. It is not recommended for production use at this time.

  3. Overview of Google Cloud Bigtable client for Rust

    main

    The google-cloud-bigtable crate provides the client library for interacting with Google Cloud Bigtable.

    Important Notice: This crate is currently under active development. It is subject to frequent breaking changes and incomplete testing. It is not recommended for production use at this time. Developers are encouraged to provide feedback on APIs, documentation, and features.

  4. Overview of Google Cloud Spanner for Rust

    main

    This crate provides the client library for interacting with Google Cloud Spanner from Rust applications.

    Note on Stability: This crate is currently in a preview release. While the APIs are considered stable, the maintainers may introduce breaking changes based on user feedback to improve usability. Users should be prepared for potential API evolutions during this preview period.

  5. Overview of Google Cloud BigQuery Client Library for Rust

    main

    The google-cloud-bigquery crate provides a Rust implementation of the Google Cloud BigQuery client library. It allows developers to interact with BigQuery services from Rust applications.

    Note on API Stability: This crate is currently in a preview release. While the maintainers believe the APIs are stable, users should be aware that breaking changes may occur as feedback is gathered to improve usability.

  6. Use the Cloud Spanner gRPC mock for testing

    main

    The spanner/grpc-mock crate provides a mockable implementation of the Cloud Spanner API service over gRPC. It is designed to allow developers to test client library interactions without a live Spanner instance.

    Note: This crate is primarily used in client library tests and is not intended for production use cases.

  7. Use the Google Cloud Storage client library

    main

    This crate provides the necessary traits, types, and functions to interact with Google Cloud Storage. It is split into two primary client types based on your use case:

    • Storage client: Use this for standard data plane operations, such as reading and writing objects.
    • StorageControl client: Use this for administrative operations (control plane).

    For a complete walkthrough, refer to the [Using Google Cloud Storage] section of the Google Cloud Client Libraries for Rust user guide.

    Note: This crate is distinct from the gcloud-storage crate, which is a community-maintained project.

    // Use the Storage client for reading/writing objects
    // Use the StorageControl client for admin operations
    // Refer to the user guide for implementation details
    // https://googleapis.github.io/google-cloud-rust/storage.html
  8. Use the Cloud Pub/Sub gRPC mock for testing

    main

    The pubsub/grpc-mock crate provides a mockable implementation of the Cloud Pub/Sub API service over gRPC. It is designed to allow developers to test client library interactions without connecting to actual Google Cloud services.

    Note: This crate is primarily used in client library tests and is not intended for general production use cases.

  9. Understand the project structure and code locations

    main

    The repository is organized to separate automatically generated code from hand-crafted logic. Developers should focus on the following directories depending on their needs:

    • Generated Libraries: Found in src/generated/*.
    • Authentication: The src/auth directory contains the authentication library.
    • Well-Known Types (WKT): Shared types used across all libraries are in src/wkt.
    • Common Client Components (gax): Located in src/gax. This crate contains error handling, retry, backoff, and polling policies. Most types in this crate are intended for use by application developers.
    • Long-Running Operations (LRO): Support code for LROs is in src/lro.
    • User Guides and Samples: Tutorials are in guide/src and runnable code samples are in guide/samples.