< 返回版块

Mike Tang 发表于 2020-05-26 19:40

Tags:rust,intro

watt - 将过程宏编译为 wasm 字节码的工具和运行时

这个项目的思路很清奇,之前也报道过。先通过这个方式编译成 wasm 字节码,后面用的时候,就不用再从头编起了。节约了时间(好像是用的空间换时间策略)。这种方法有它的一些好处,详情见项目文档:https://github.com/dtolnay/watt

这次要说的是,已经有一些志愿者提前编好了一些过程宏了(需要一直跟版本?)。看这里:https://github.com/jakobhellermann/watt-contrib/

现在又出现一个项目 https://github.com/jakobhellermann/cargo-watt,这个项目相当于帮人帮到底,继续干了一些样板活,几乎可以“一键”把过程宏搞成 wasm 字节码了。

厉害厉害。

nom-tutorial - nom 解析器工具的教程

都说 nom 难,好在教程一打一打的来了。

https://github.com/benkay86/nom-tutorial

unicode-width - 计算一个 unicode 字符的显示宽度的库

这个库有用啊,特别是在写编辑器的时候。不同的 unicode 字符显示出来的字符宽度是不一样的。

https://github.com/unicode-rs/unicode-width

md-inc 在 markdown 文件里面加载其它文件

可以快速加载外部代码进来。这是一个cli工具,直接可用 cargo install 安装。需要单独处理过程。具体的方法,是用了 md 的注释里面可以写东西的技巧。

https://github.com/martypapa/md-inc

dmux - 用 Rust 写的一个类似 tmux 的 console 窗口管理器

tmux 不用我介绍了吧。程序员必用。之前小编也想克隆一个 tmux 玩玩,现在有了 dmux, 空了准备试一下。

https://github.com/zdcthomas/dmux

书:从 0 到产品(利用 Rust 语言描述)

讲云原生应用开发从 0 到产品的一本书,连载。惊喜的是是用 Rust 语言来描述。强烈推荐。

https://www.lpalmieri.com/posts/2020-05-24-zero-to-production-0-foreword/

这是前言。

CRDT = Conflict-free Replicated Data Type

这个概念很有新意。可以用在实时协同编辑doc之类的应用上面。新知识太多,小编根本学不过来了。

这是一个示例:https://github.com/anchpop/crdts

这是 CRDT 的一个简单教程:http://jtfmumm.com/blog/2015/11/17/crdt-primer-1-defanging-order-theory/

access-queue - 无船哥写的并发限制库

无船哥经常写一些有趣的新东西出来,和一些思考得很深的文章。毕竟,别人是Mozilla研究员。

利用这个库,可以对某一个资源的并发访问设限。

https://github.com/withoutboats/access-queue

regress - 又一个正则表达式库,兼容 JS 语法

哇哦。厉害!可以试试,不过刚出来不久,还有一些不完善的地方。

https://github.com/ridiculousfish/regress

Rust 中的集成测试

https://joshleeb.com/blog/rust-integration-tests/

动态可扩展的 rayon 并行迭代器

非常容易使用。

https://github.com/haraldh/dynqueue

cargo-all-features - 让你非常容易测试各种 feature 组合的 cargo 辅助工具

对于一个大一点的库来说,各种 feature 开关的测试,真心让人头痛。现在这个工具来救场了。

https://github.com/frewsxcv/cargo-all-features

goose - 负载测试框架

goose 借鉴自 Locust。新版本引入了 async,执行速度提高了两倍。

https://github.com/tag1consulting/goose

fltk-rs - fltk GUI 库的 rust 绑定

https://github.com/MoAlyousef/fltk-rs

要去推广 Rust 的话,有哪些材料比较好

这几篇不错。

  • Rewriting the heart of our sync engine - Dropbox https://dropbox.tech/infrastructure/rewriting-the-heart-of-our-sync-engine

  • Using Rust in Windows - Microsoft https://msrc-blog.microsoft.com/2019/11/07/using-rust-in-windows/

  • Why Discord is switching from Go to Rust - Discord https://blog.discord.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f

评论区

写评论
作者 Mike Tang 2020-05-28 09:14

题集刷刷leetcode。

小项目太多了。crates.io 上随便搜一下,看下载多的。

newbie 2020-05-28 07:59

大哥 新手刚看完the book & learn by example 有没有练手的小项目或者题集推荐啊

1 共 2 条评论, 1 页