dapr / dapr/rust-sdk

Proc macros to reduce boiler plate

Open
#77 5 comments 0 reactions 0 assignees View on GitHub
enhancement P2 pinned
Dominant language
Rust
Stars
252
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Dapr seems quite easy to get going in other languages that provide annotations/attributes.
I think the same should be done for the Rust SDK.

For example:

```cs
[Topic("pubsub", "orders")]
[HttpPost("/checkout")]
public async Task>Checkout(Order order, [FromServices] DaprClient daprClient)
{
// Logic
return order;
}
```

Could be expressed as:

```rs
#[topic(pub_sub_name = "pubsub", topic = "orders")]
#[post("/checkout")]
async fn hello(order: Order) -> String {
format!("Order id: {}", order.id)
}
```

Am I right in thinking that the difficulty comes in the variety of HTTP server crates? Or is that quite decoupled from decorating the handler?

Contributor guide

Open the contributing guide

Research direction

Start by surveying how the Rust SDK handles HTTP server crates and whether handler decoration can be decoupled from them. Define the supported proc-macro API and its integration boundaries before implementation; done means the project has an agreed design and working annotations across the intended server integrations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.