ITPub博客

首页 > 数据库 > 数据库开发技术 > 【Rust日报】2021-07-16 Rust 重写 go 项目的一次实践

【Rust日报】2021-07-16 Rust 重写 go 项目的一次实践

原创 数据库开发技术 作者:Rust语言中文社区 时间:2021-07-16 21:38:16 0 删除 编辑

rust-script,可以在没有任何设置或编译步骤的情况下运行 rust 文件和表达式

$ echo 'println!("Hello, World!");' > hello.rs
$ rust-script hello.rs
Hello, World!

也支持依赖 crate
#!/usr/bin/env rust-script
//! This is a regular crate doc comment, but it also contains a partial
//! Cargo manifest. Note the use of a *fenced* code block, and the
//! `cargo` "language".
//!
//! ```cargo
//! [dependencies]
//! time = "0.1.25"
//!
fn main() {
println!("{}", time::now().rfc822z());
}
$ rust-script now
Wed, 28 Oct 2020 00:38:45 +0100
链接:https://rust-script.org/
GitHub:https://github.com/fornwall/rust-script

quickwit - 又一个基于 tantivy 的新 Rust 搜索引擎

quickwit 刚发布 0.1 版,他号称是一个高性价比的分布式搜索引擎,想让你花尽可能低的成本搜索大量数据。
链接:https://quickwit.io/blog/quickwit-first-release
Github:https://github.com/quickwit-inc/quickwit

Rust 重写 go 项目的一次实践

国外一个工程师用 Rust 重写 go 项目,最开始慢 4~5 倍,然后经过 Rust 社区网友支招优化以后,反过来比 go 项目快且稳定。
这个帖子下涉及一些异步优化技巧可以看看
链接:https://www.reddit.com/r/rust/comments/oje3w7/rewrote_golang_project_in_rust_its_4x_times/
-- 
From 日报小组 Folyd,侯盛鑫
社区学习交流平台订阅:
  • Rustcc论坛: 支持rss
  • 微信公众号:Rust语言中文社区

原文作者:Rust语言中文社区;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2020-06-11

  • 博文量
    1769
  • 访问量
    718703