14 releases (9 breaking)

0.11.0 Feb 22, 2023
0.10.0 Oct 19, 2022
0.9.0 Jul 11, 2022
0.7.3-alpha.0 Jan 20, 2022
0.1.0-alpha.2 Oct 29, 2019

#9 in #microservices

Download history 70/week @ 2022-11-28 71/week @ 2022-12-05 31/week @ 2022-12-12 44/week @ 2022-12-19 28/week @ 2022-12-26 10/week @ 2023-01-02 17/week @ 2023-01-09 14/week @ 2023-01-16 21/week @ 2023-01-23 27/week @ 2023-01-30 16/week @ 2023-02-06 41/week @ 2023-02-13 47/week @ 2023-02-20 36/week @ 2023-02-27 71/week @ 2023-03-06 18/week @ 2023-03-13

175 downloads per month

Custom license

34KB
439 lines

Dapr SDK for Rust

Crates.io Build Status License: Apache 2.0 FOSSA Status

⚠ Work in Progress ⚠

Dapr is a portable, event-driven, serverless runtime for building distributed applications across cloud and edge.

Prerequsites

Usage

[dependencies]
dapr = "0.11.0"

A client can be created as follows:

use dapr;

async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Get the Dapr port and create a connection
    let port: u16 = std::env::var("DAPR_GRPC_PORT")?.parse()?;
    let addr = format!("https://127.0.0.1:{}", port);

    // Create the client
    let mut client = dapr::Client::<dapr::client::TonicClient>::connect(addr).await?;

Try out examples

Examples

Building

To build

cargo build

Note: The proto buf client generation is built into cargo build process so updating the proto files under dapr/ is enough to update the proto buf client.

To refresh .proto files from upstream dapr

  1. Just need to run update-protos.sh, which will basically fetch latest proto updates.
  2. By default, it picks from master proto. To specify a particular release/version, please specify with a -v flag
./update-protos.sh -v v1.10.1

Dependencies

~6–10MB
~171K SLoC