rust
rust copied to clipboard
upgrade lambda_runtime crate dependencies & add async handler fn support
This PR includes below changes, please let me know ur feedback, thanks!
- Add async handler fn support
- Make tokio an optional dependency behind feature
runtime
(default on) - Upgrade tokio to 1.14
- Upgrade http to 0.2
- Upgrade lambda_runtime to 0.4
- Upgrade to rust 2021
The API change in this PR should keep backward compatibility. All style changes come from cargo fmt
Resolves https://github.com/vercel-community/rust/issues/46 https://github.com/vercel-community/rust/issues/20
Could normal and async stuff be in separate files (e.g sync.rs
and async.rs
), since they're pretty much distinct from what I see in the implementation?
Also, why do we need this?
# Cargo.toml
[dev-dependencies]
anyhow = "1"
tokio = "1.12"
Async should really be a first-class citizen. Is there anything we could do to move this forward?
It will be great if this PR can get reviewed soon, before it's merged and published, ppl can point the crate to my fork
# Cargo.toml
vercel_lambda = {git = "https://github.com/hanabi1224/rust", branch = "update_lambda_runtime_deps"}
Is this abandoned ?