Crates.io | dapr-derive |
lib.rs | dapr-derive |
version | 0.1.0-alpha.2 |
source | src |
created_at | 2019-10-25 10:17:10.268933 |
updated_at | 2019-10-29 10:22:37.411906 |
description | Dapr SDK for Rust |
homepage | https://github.com/flier/rust-dapr |
repository | https://github.com/flier/rust-dapr |
max_upload_size | |
id | 175569 |
size | 14,662 |
Dapr is a portable, event-driven, serverless runtime for building distributed applications across cloud and edge.
This is the Dapr SDK for Rust, based on the auto-generated protobuf client.
For more info on Dapr and gRPC, visit this link.
dapr::Runtime
#[dapr::service]
dapr
currently works on rust 1.39-beta
and above as it requires support for the async_await
feature. To install the beta simply follow the commands below:
$ rustup install beta
$ rustup component add rustfmt --toolchain beta
$ cargo +beta build
The examples folder contains a Dapr enabled app that receives events (client), and a caller that invokes the Dapr API (caller).
$ cargo +beta build --example client
$ dapr run --log-level debug --protocol grpc --port 3500 --grpc-port 3600 --app-id client --app-port 4000 target/debug/examples/client
$ DAPR_GRPC_PORT=3600 cargo +beta run --example caller
Note: If you don't setup a Dapr binding, expect the error message
Error: Status { code: Unknown, message: "ERR_INVOKE_OUTPUT_BINDING: couldn't find output binding storage" }
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tonic by you, shall be licensed as MIT, without any additional terms or conditions.