aws / aws/aws-lambda-rust-runtime
Remove tokio `rt-multi-thread` feature from `lambda_runtime` and `lambda_extension`, and possibly `rt` as well
- 主要语言
- Rust
- 星标
- 3.6k
- 派生
- 396
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently the `lambda_runtime` crate has an unconditional dependency on tokio withe `rt-multi-thread` feature enabled:
- https://github.com/awslabs/aws-lambda-rust-runtime/blob/main/lambda-runtime/Cargo.toml#L53
- https://github.com/awslabs/aws-lambda-rust-runtime/blob/main/lambda-extension/Cargo.toml#L35
I'm struggling to see anywhere this dependency is actually used. Meanwhile, given that lambdas only receive one request at a time, it will frequently make sense for callers to only want to use the current thread runtime anyway (ref: #985 ).
I don't think we even need the `rt` (not multithreaded) feature for `lambda-runtime`, not seeing anywhere we are spawning or interacting with feature gated APIs. Though, for #983 we would need it, so probably ok to leave in?
Anyway, is there a reason we need to depend on the multithreaded runtime feature? Am I missing something?
贡献指南
调研方向
检查 lambda-runtime/Cargo.toml 和 lambda-extension/Cargo.toml 中 tokio 的依赖声明,然后在这些 crate 中搜索由 rt 和 rt-multi-thread features 控制的 API。确认这两个 feature 中是否有任何一个是必需的,并验证依赖配置对于受支持的 runtime 使用场景仍然可以构建;当不必要的 features 被移除或其必要性得到文档说明时,该 issue 即得到解决。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- backend
- Issue 类型
- 重构
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100