• Stars
    star
    212
  • Rank 186,122 (Top 4 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dapr SDK for Rust - Alpha

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.

Prerequisites

Ensure you have Rust version 1.40 or higher installed. If not, install Rust here.

How to use

Add the following to your Cargo.toml file:

[dependencies]
dapr = "0.13.0"

Here's a basic example to create a client:

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?;

Explore more examples

Browse through more examples to understand the SDK better: View examples

Building

To build the SDK run:

cargo build

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

Updating .proto files from upstream Dapr

To fetch the latest .proto files from Dapr execute the script update-protos.sh:

./update-protos.sh

By default, the script fetches the latest proto updates from the master branch of the Dapr repository. If you need to choose a specific release or version, use the -v flag:

./update-protos.sh -v v1.12.0

More Repositories

1

dapr

Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge.
Go
23,824
star
2

dotnet-sdk

Dapr SDK for .NET
C#
1,107
star
3

quickstarts

Dapr quickstart code samples and tutorials showcasing core Dapr capabilities
Java
1,027
star
4

docs

Dapr user documentation, used to build docs.dapr.io
HTML
992
star
5

components-contrib

Community driven, reusable components for distributed apps
Go
543
star
6

go-sdk

Dapr SDK for go
Go
443
star
7

samples

Community driven repository for Dapr samples
JavaScript
412
star
8

cli

Command-line tools for Dapr.
Go
317
star
9

java-sdk

Dapr SDK for Java
Java
258
star
10

python-sdk

Dapr SDK for Python
Python
222
star
11

js-sdk

Dapr SDK for Javascript
JavaScript
197
star
12

dashboard

General purpose dashboard for Dapr
Go
181
star
13

community

Governance and community material for Dapr and its open source sub-projects
140
star
14

php-sdk

Dapr SDK for PHP
PHP
70
star
15

dapr-shared

Dapr Shared enables users to deploy Dapr as a DaemonSet or a Deployment instead of a sidecar
Go
48
star
16

installer-bundle

Dapr bundled installer containing CLI and runtime packaged together. This eliminated the need to download Docker images when initializing Dapr locally.
36
star
17

cpp-sdk

C++ SDK for Dapr
Makefile
36
star
18

helm-charts

Helm Charts for Dapr
20
star
19

mechanical-markdown

Python
20
star
20

kit

Shared utility code for Dapr runtime
Go
19
star
21

sig-api

Repository for Dapr API Special Interest Group
HTML
18
star
22

proposals

Proposals for new features in Dapr
15
star
23

test-infra

Test apps and tools for Dapr
C#
14
star
24

setup-dapr

GitHub Action for installing the Dapr CLI
JavaScript
10
star
25

docs-zh

Chinese translation of the Dapr documentation
9
star
26

kubernetes-operator

Go
6
star
27

blog

HTML
5
star
28

website

Website for the Dapr project
HTML
5
star
29

sig-sdk-spec

Repository for Dapr SDk Spec Special Interest Group
3
star
30

.github

1
star
31

homebrew-tap

Repository to enable Dapr cli installation via macOS' Homebrew.
Ruby
1
star