cloudwego / cloudwego/pilota

Make `pilota.rust_wrapper_arc` annotation wrapper Arc outside

Open
#126 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
167
Forks
25
PR merge metrics
No merged PRs in 30d

Description

## Feature Request

### Motivation
Can `pilota.rust_wrapper_arc` annotation support wrapper Arc like this:
```thrift
struct B {
1: required list a(pilota.rust_wrapper_arc="inner"),
2: required list b(pilota.rust_wrapper_arc="outer"),
}
```
Generated:
```rust
pub struct B {
a: ::std::collections::Vec<::std::sync::Arc<::pilota::FastStr>>,
b: ::std::sync::Arc<::std::collections::Vec<::pilota::FastStr>>,
}
```

Contributor guide

Open the contributing guide

Research direction

Start by locating the implementation of the `pilota.rust_wrapper_arc` annotation and the Rust code-generation path for annotated Thrift fields. Verify the change against the supplied `struct B` example: `inner` should wrap the element type and `outer` should wrap the collection, producing the shown Rust types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.