12个Rust的Tips

CowCrossbeam channelsScopeguardCargo-makeimpl TraitClippythiserroranyhowdbg!()println!()include_str!()include_bytes!()cc

链接:https://federicoterzi.com/blog/12-rust-tips-and-tricks-you-might-not-know-yet/

Rust语言圣经

又又又一个 Rust 教程:对 Rust 语言进行全面且深入的讲解,辅以生动的示例和习题。

教程地址:https://course.rs/

GitHub:https://github.com/sunface/rust-course

scapegoat

通过基于 arena 的 scapegoat tree(内存高效、自平衡二叉搜索树)实现的有序集合和映射数据结构。

#![no_std]#![forbid(unsafe_code)]

两个 API:

SgSetSgMap

分享 Slide:https://tiemoko.com/slides/SafeAndPortableDataStructureDesign_CodeAndSupply_Dec2021.pdf

GitHub:https://github.com/tnballo/scapegoat

RedisJSON

RedisJSON 是一个 Redis 模块,实现了 ECMA-404 JSON 数据交换标准作为原生数据类型。它允许从 Redis 键(文档)存储、更新和获取 JSON 值。主要特点:

  • 完全支持 JSON 标准

  • 在文档中选择元素使用类似 JSONPath 的语法

  • 文档存储为树结构中的二进制数据,允许快速访问子元素

  • 所有 JSON 值类型支持类型化原子操作

  • 基于 RediSearch 的二级索引支持

文档:https://oss.redis.com/redisjson/

GitHub:https://github.com/RedisJSON/RedisJSON

dpc_pariter

rayon

博客:https://dpc.pw/adding-parallelism-to-your-rust-iterators

GitHub:https://github.com/dpc/pariter


From 日报小组 长琴

社区学习交流平台订阅:

  • Rustcc 论坛:支持 rss

  • 微信公众号:Rust 语言中文社区