aws / aws/aws-lambda-rust-runtime
Remove tokio `rt-multi-thread` feature from `lambda_runtime` and `lambda_extension`, and possibly `rt` as well
- Ngôn ngữ chính
- Rust
- Star
- 3.6k
- Fork
- 396
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Hướng nghiên cứu
Rà soát các khai báo dependency của tokio trong lambda-runtime/Cargo.toml và lambda-extension/Cargo.toml, sau đó tìm trong các crate này các API được bật bởi các feature rt và rt-multi-thread. Xác nhận xem một trong hai feature có bắt buộc hay không, đồng thời kiểm tra rằng cấu hình dependency vẫn build được cho các trường hợp sử dụng runtime được hỗ trợ; issue được giải quyết khi các feature không cần thiết bị loại bỏ hoặc sự cần thiết của chúng được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- backend
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100