Skip to content

OpenFGA SDK for Rust, built from OpenFGA's official protobuf files

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

liamwh/openfga-rs

Repository files navigation

OpenFGA Rust SDK

Automatically generated Rust SDK for the OpenFGA API, using the protobufs from OpenFGA API.

Getting Started

You can instantiate the SDK like so:

use openfga_rs::open_fga_service_client::OpenFgaServiceClient;

#[tokio::main]
async fn main() -> Result<()> {
    let _openfga_client = OpenFgaServiceClient::connect("http://[::1]:8081")
      .await
      .expect("Expected to connect to the OpenFGA gRPC endpoint successfully");

    println!("Connected to OpenFGA service");
    Ok(())
}