< 返回版块

苦瓜小仔 发表于 2025-06-11 14:50

Tags:日报

文章《Rewriting SymCrypt in Rust to modernize Microsoft’s cryptographic library 》

作者:微软研究院 | Aeneas 团队

微软正在将 SymCrypt(微软的开源密码学库)从 C 语言重写为 Rust,以提升内存安全性和防范漏洞。

SymCrypt 广泛应用于 Windows、Azure Linux 和 Xbox 等平台,目前主要用 C 语言编写,并包含少量硬件特定优化代码。

重写过程中,微软将结合形式化验证方法,利用 Aeneas 工具将 Rust 代码与证明分离,并连接到 Lean 等证明助手。

为兼容现有 C API,微软将使用 Eurydice 将 Rust 编译为 C。

此外,微软还将扩展 Revizor 工具以分析二进制文件,检测硬件级侧信道漏洞。

目前,初步的 Rust 版 ML-KEM 已在 SymCrypt 仓库的预览分支中可用。

阅读:https://www.microsoft.com/en-us/research/blog/rewriting-symcrypt-in-rust-to-modernize-microsofts-cryptographic-library/

Reddit:https://www.reddit.com/r/rust/comments/1l84vp0/rewriting_symcrypt_in_rust_to_modernize/

Aeneas 生态中的工具:

  • Aeneas:Rust 程序的验证工具链,翻译为纯 lamdba 演算。
  • Eurydice:将 Rust(一个适度子集)编译为 C。在 Rust 中验证程序,仍可获得适用于遗留环境的 C 代码。
  • Scylla:将超常规的 C 代码转换为 Safe Rust 的工具
  • Charon:基于 MIR 提供形式化验证所需的 Rust 语义分析数据

Unfair Rust Quiz - 一系列 Unsafe Rust 小测验

不安全代码中的各种奇葩 bug,由 Rust 编译器成员所写。

类似于 rust-quiz,但针对 Unsafe Rust。

测验:https://this.quiz.is.fckn.gay/

仓库:https://github.com/BoxyUwU/rust-quiz

文章《Meilisearch 1.15 发布》

Meilisearch 1.15 新增功能:可关闭数字的拼写容错,使搜索更精确,如搜索 “2024” 仅匹配 “2024”;支持对字符串使用比较运算符进行过滤,如按日期范围筛选;改进中文支持,需重新索引中文数据以确保正确处理。

阅读:https://www.meilisearch.com/blog/meilisearch-1-15

Reddit:https://www.reddit.com/r/rust/comments/1l7t4sm/meilisearch_115/

文章《Multi-player, serverless, durable terminals》

作者:Stephen Balogh

S2 团队利用其无服务器流存储服务 S2 实现了一个多玩家、无服务器、持久化的终端(s2.term)。

该终端通过 S2 流传输输入输出数据,客户端为运行 xterm.js 的网页,后端为 Rust 编写的伪终端进程。

尽管跨区域延迟较高(约 155ms),但终端仍可接受。

s2.term 支持多用户同时操作、自动保存 I/O 数据并提供回放功能,且无需配置服务器。

阅读:https://s2.dev/blog/s2-term

Reddit:https://www.reddit.com/r/rust/comments/1l8f7f3/multiplayer_durable_terminals_via_a_shared_log/

文章《The Concurrency Trap: How An Atomic Counter Stalled A Pipeline》

Conviva 的流分析平台因一个原子计数器导致并发陷阱,使某客户的 P99 延迟飙升。

平台基于 DAG 引擎,使用自定义的基于 Tokio 的参与者模型。

问题源于共享类型注册表中的原子计数器,导致高并发读取时缓存失效。

通过将 flashmap 替换为 ArcSwap,采用读-复制-更新机制,避免了缓存争用,显著降低了 CPU 负载并解决了性能问题。

阅读:https://www.conviva.com/platform/the-concurrency-trap-how-an-atomic-counter-stalled-a-pipeline/

Reddit:https://www.reddit.com/r/rust/comments/1l8aavl/the_concurrency_trap_how_an_atomic_counter/

Rustacean Station:采访 Flarion CEO

Ran Reichman 是 Flarion 的联合创始人兼 CEO,在 Rustacean Station 节目中分享了他们公司使用 Rust 构建高性能数据处理系统的经验。

他讨论了 Rust 在创业公司中的适用性、与其他语言的比较、招聘 Rust 开发者的挑战以及对 Rust 生态系统的看法。

https://rustacean-station.org/episode/ran-reichman/

Gazan - 基于 Cloudflare Pingora 的反向代理

它是完全异步、高性能、现代反向代理,具有一些服务网格功能,具有自动 HTTP2、gRPS 和 WebSocket 检测和代理支持。

它内置了 JWT 身份验证支持,带有令牌服务器、Prometheus 导出器和许多其他奇特的功能。

100% 用 Rust 编写,在 Pingora 上,最近的测试表明它可以在中等硬件上每秒执行 130k 个请求。

仓库:https://github.com/sadoyan/gazan

Reddit:https://www.reddit.com/r/rust/comments/1l7x82y/gazan_high_performance_pure_rust_opensource_proxy/

Pixi - 基于 conda 的包管理器

Pixi 是一个跨平台、多语言的包管理器和工作流工具,基于 conda 生态系统构建。

它为开发者提供类似于流行的包管理器(如 Cargo 或 Yarn)的卓越体验,但适用于任何语言。

网站:https://pixi.sh

仓库:https://github.com/prefix-dev/pixi/

演讲视频:https://www.youtube.com/watch?v=Hso3TQx13b0

Scientific Computing in Rust 2025 演讲回放列表

网站:https://scientificcomputing.rs/2025/

视频:https://www.youtube.com/playlist?list=PLrueqeouhcZNRW7H26DfscFjGSf0Pzd8c

RustWeek 演讲回放列表

网站:https://rustweek.org/schedule/tuesday

视频:https://www.youtube.com/playlist?list=PL8Q1w7Ff68DCEXiGidlM0DMn8ztjlUlez

--

From 日报小组 苦瓜小仔

社区学习交流平台订阅:

评论区

写评论

还没有评论

1 共 0 条评论, 1 页