来自汉东兄。网络
今天看了withoutboats发的博文,是关于Rust await语法的最后讨论结果,也许会有变化,但应该差很少了。 这我看完文章后总结的一张脑图,分享一下。app
官方语言核心团队倾向于 .await 这种后缀语法。社区也是炸开锅各抒己见的。
curl
最终决定会在5月23号作出。无论怎样,我支持官方的决定。ide
Read More工具
其实其它语言不少都有了。Rust一直显得比较生硬,格式化一个带变量值的字符串,要这样写:测试
println!("x: {x}, y: {y}, x + y: {sum}", x=x, y=y, sum=x+y);
使用这个库,能够这么写了。ui
let four = 4;
iprintln!("four plus four is: {four + 4}");
// four plus four is: 8
iprintln!("here's a hex number: 0x{0xb0bi64 * 1321517i64 :x}");
// here's a hex number: 0xdeadbeef
iprintln!("here's a debugging value: {Some(four):?}");
// here's a debugging value: Some(4)
做者把一套宏所有“升级”了。google
format! -> iformat!
print! -> iprint!
println! -> iprintln!
eprint! -> ieprint!
eprintln! -> ieprintln!
write! -> iwrite!
writeln! -> iwriteln!
format_args! -> iformat_args!
Repourl
ANSI转义序列 就是这种 "This is \u{1b}[3Asome text!",咱们平时在终端下看到的文字的色彩啊,一些特效格式啊什么的,都是按这个标准来作的。spa
类似的库还有 vte
Repo
欧洲人很爱 Rust?你们都爱嘛。他们从 2014 年起就开始进行Rust聚会了。国内要更多点才好。不只是大会,各个城市的小会也搞起来。
Read More
这里的用户界面指的是,一个库,提供给别人使用的界面。一般来讲,多是 API。可是有些库,好比过程宏这种,它不是简单的 API 测试能覆盖的。因此就有了这个库。
这个库设计得特别适合过程宏的测试。看一下它的效果。
强烈推荐。
Repo
做者也是写命令行工具的时候,以为测试很不舒服,因而写了这个方便测试的工具。很不错。
好比:
let output = exec!{
"my_bin",
args: ["-p", "/"],
cwd: "/tmp",
env: {
THREADS: "4"
},
stdin: b"show-hidden",
timeout: 60000,
log: true,
code: 0,
stdout: b"Started program... Done.",
stderr: []
};
// output can be used here like a normal process::Output
Repo
用了Tor技术,其貌似是要提供一种匿名服务。好比要访问google.com
curl https://google.com -x 54.95.171.65:2888 -L
项目还在早期阶段,值得关注。