This example assumes that you have Dapr Cli and docker installed on the local machine and that you are running the default instance of Redis installed on Docker.
docker ps
- To run the example we need to first build the examples using the following command:
cargo build
- Run the example with dapr using the following command:
dapr run --app-id=dapr_rust_02 --dapr-grpc-port 3500 cargo run
If everything went well you should see the following output along with dapr logs:
Starting Dapr Rust application...
Waiting for Dapr sidecar to be ready...
Connected to Dapr successfully.
Successfully saved key 'K1' in store 'statestore'.
Retrieved value: "Hello World"
Successfully deleted key 'K1' from store 'statestore'.
Value was successfully deleted.