【Rust日报】2023-01-30 Rust 更适合 serverless
2023-03-07 09:14:41 时间
Rust 更适合 serverless
为什么Rust 更适合用于 serverless ? 因为它对用户来说更快,尤其是冷启动时. 点击下面的 Lambda冷启动分析
链接 来体验一下不同语言的冷启动速度.
- Lambda 冷启动分析: https://maxday.github.io/lambda-perf/
- 源代码: https://github.com/maxday/lambda-perf
对<<Rust Web Programming>>
作者的访谈
这是对 <<Rust Web Programming>>
作者 Maxwell Flitton 的访谈, 主要介绍如何使用 Rust 来构建 web 服务.
原文链接: https://rustacean-station.org/episode/maxwell-flitton/
边做边学: Rust构建 HTTP API 服务
本文详细介绍了如何使用 axum 来构建 web API.
原文链接: https://blog.frankel.ch/http-api-rust/
derive_more
如库名所示, derive_more 可以让你轻松的 derive 更多的 trait 实现, 而不用去写一堆的重复代码.
use derive_more::{Add, Display, From, Into};
#[derive(PartialEq, From, Add)]
struct MyInt(i32);
#[derive(PartialEq, From, Into)]
struct Point2D {
x: i32,
y: i32,
}
#[derive(PartialEq, From, Add, Display)]
enum MyEnum {
#[display("int: {_0}")]
Int(i32),
Uint(u32),
#[display("nothing")]
Nothing,
}
assert!(MyInt(11) == MyInt(5) + 6.into());
assert!((5, 6) == Point2D { x: 5, y: 6 }.into());
assert!(MyEnum::Int(15) == (MyEnum::Int(8) + 7.into()).unwrap());
assert!(MyEnum::Int(15).to_string() == "int: 15");
assert!(MyEnum::Uint(42).to_string() == "42");
assert!(MyEnum::Nothing.to_string() == "nothing");
github地址:https://github.com/JelteF/derive_more
相关文章
- 振弦采集模块参数配置工具的连接与断开
- 学习小组笔记Day3-蘑菇
- 探索纺织业数智化转型新路,涂鸦智能携手万事利丝绸打造“共享工厂”
- 文档流code案例小汇【处理高度塌陷】
- Go 介绍与常见数据类型
- 原来这就是FMEA
- 【愚公系列】2023年01月 Dapr分布式应用运行时-多容器微服务使用Dapr
- 任正非让寒气传递到每个人身上,互联网寒冬程序员该如何破冰?
- Nik Collection 5 for Mac(PS滤镜插件套装) v5.4.0/v4.3.6中文版
- 京雀使用
- 客服系统即时通讯IM开发(五)网站实时向在线访客推送消息
- Apache Hudi 0.12.2发布
- 网站人工客服咨询系统的优势和实现方式介绍
- 【Google】AdSense的Pin终于收到了
- 鹅场分布式系统DevOps自动化测试实践
- CyclicBarrier和Condtion
- MQTT 发布/订阅模式介绍
- grid布局了解一下
- 工作流引擎架构设计
- 生信学习小组Day3笔记—Chocolate Ice