aws / aws/aws-lambda-rust-runtime
Remove tokio `rt-multi-thread` feature from `lambda_runtime` and `lambda_extension`, and possibly `rt` as well
- Lingua principale
- Rust
- Stelle
- 3.6k
- Fork
- 396
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Review the tokio dependency declarations in lambda-runtime/Cargo.toml and lambda-extension/Cargo.toml, then search these crates for APIs gated by the rt and rt-multi-thread features. Confirm whether either feature is required, and verify that the dependency configuration still builds for the supported runtime use cases; the issue is resolved when unnecessary features are removed or their need is documented.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- backend
- Tipo di issue
- Refactoring
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100