Skip to content

About

Rust client for the SpiceDB gRPC API.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

spicedb-rs-client

Rust client for the SpiceDB gRPC API.

crates.io: spicedb-rs-client crates.io: spicedb-rs-proto Documentation Downloads License Rust

Build Check Test Upstream sync


Installation

[dependencies]
spicedb-rs-client = "1.53.0"

Usage

use spicedb_rs_client::{ClientBuilder, v1::ReadSchemaRequest};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = ClientBuilder::new("grpc.authzed.com:443")
        .with_token("spicedb")
        .connect()
        .await?;

    let resp = client.schema().read_schema(ReadSchemaRequest {}).await?;
    println!("{}", resp.into_inner().schema_text);
    Ok(())
}

Development

Repository tasks are driven by just; run just to list every recipe.

# Proto sync (all flags are optional)
just sync-proto [--api-dir <PATH>] [--api-repo <URL>] [--api-ref <REF>] [--proto-dir <PATH>]

# Bump the workspace version (root Cargo.toml)
just bump-version <VERSION>

# Record an upstream sync in CHANGELOG.md
just update-changelog --api-ref <TAG> --previous-version <VERSION> --date <YYYY-MM-DD>

# Format, lint, and test as CI does
just check

# Publish to crates.io (proto first, then client)
just publish-dry
just publish
  • If --api-dir is set, --api-repo and --api-ref are ignored.
  • Defaults: --api-repo https://github.com/authzed/api.git, --api-ref v1.53.0, --proto-dir crates/spicedb-rs-proto/proto.
  • The vendored proto is committed to the repo; run sync-proto to refresh it from upstream.

Upstream sync automation

The sync-upstream workflow runs daily and checks the latest authzed/api release. When a newer release is available, it re-runs sync-proto, bumps the version, updates CHANGELOG.md, and opens a PR. The changelog entry includes the previous and new versions plus upstream release and comparison links. Its date is the sync date (UTC). Existing version entries, release history, and [Unreleased] notes are preserved; review the generated entry before merging. You can also trigger it manually via the Actions tab (workflow_dispatch).

Test

just test

The integration tests start a disposable SpiceDB through docker; set SPICEDB_ENDPOINT to reuse a running server (just up starts the one in docker-compose.test.yml on 127.0.0.1:50051).

About

Rust client for the SpiceDB gRPC API.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages