Rust.cc

Rust.cc -

【Rust日报】2023-01-30 Rust 更适合 serverless

Rust 更适合 serverless 为什么Rust 更适合用于 serverless ? 因为它对用户来说更快,尤其是冷启动时. 点击下面的 Lambda冷启动分析链接 来体验一下不同语言的冷启动速度. Lambda 冷启动分析 源代码 对<<Rust Web Programming>> 作者的访谈 这是对 <<Rust Web Programming>> 作者 Maxwell Flitton 的访谈, 主要介绍如何使用 Rust 来构建 web 服务. 原文链接 边做边学: Rust构建 HTTP API 服务 本文详细介绍了如何使用 axum 来构建 web API. 原文链接 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地址 -- From 日报小组 BobQin,FBI小白 社区学习交流平台订阅: Rustcc论坛: 支持rss 微信公众号:Rust语言中文社区

rust

相关推荐 去reddit讨论

热榜 Top10

观测云
观测云
Dify.AI
Dify.AI
LigaAI
LigaAI
eolink
eolink

推荐或自荐