一、sonic-rs 介绍
sonic-rs 是一个基于 SIMD 的高性能 Rust JSON 库,是 sonic JSON 库的 Rust 版本。
字节跳动 sonic 开源项目如今包含了不同语言的多个 JSON 库(如下)。其中,sonic-go 最先开源,使用了 JIT 和 SIMD 技术,sonic-cpp 使用了 C++ 模板和 SIMD 技术,这两个 JSON 库均已经在字节内部得到了较大规模的落地。在成本优化大背景下,为了帮助 Golang 业务迁移 Rust,优化 Rust JSON 性能,我们基于 JSON 方面的优化经验和实践,用纯 Rust 语言开发了高性能的 JSON 库 sonic-rs。
-
sonic(Golang JSON 库):https://github.com/bytedance/sonic
-
sonic-cpp(C++ JSON 库):https://github.com/bytedance/sonic-cpp
-
sonic-rs(Rust JSON 库):https://github.com/cloudwego/sonic-rs
sonic-rs 目前支持的 JSON 功能比较齐全,基本对齐