大多数人对Rust的最大问题之一是编译时间长。原因之一是许多项目使用crates.io中相当多的依赖项。
帮助缓解crates.io上的依赖膨胀是cargo-udeps的目标之一。小编在自己的项目上试用了一下,遇到问题尚待解决。毕竟目前还是v0.1.0,期待这个插件进一步完善。Gist详情
lyys-MBP:abc lyy$ cargo install cargo-udeps
Updating crates.io index
Downloaded cargo-udeps v0.1.0
Downloaded 1 crate (19.7 KB) in 2.45s
Installing cargo-udeps v0.1.0
Downloaded cargo v0.38.0
Downloaded curl v0.4.23
...
Compiling cargo v0.38.0
Compiling cargo-udeps v0.1.0
Finished release [optimized] target(s) in 3m 28s
Installing /Users/lyy/.cargo/bin/cargo-udeps
Installed package `cargo-udeps v0.1.0` (executable `cargo-udeps`)
lyys-MBP:abc lyy$ cargo +nightly udeps
Compiling semver-parser v0.7.0
...
Running /abc/target/debug/build/abc-runtime-a1002fbc69f0d1e8/build-script-build
error: failed to run custom build command for abc-runtime v2.0.0 (/abc/runtime)
Caused by:
process didn't exit successfully: /abc/target/debug/build/abc-runtime-a1002fbc69f0d1e8/build-script-build (exit code: 1)
--- stderr
error: 'run' isn't a valid value for ''
[possible values: udeps]
USAGE:
cargo-udeps --manifest-path --message-format
For more information try --help
warning: build failed, waiting for other jobs to finish...
Error: StrErr("build failed")
由Brian St. Pierre编写的 Introduction to Rust Web Applications
一个快速且简单的指南,使用 Rust 全栈开发 Web 应用:
Diesel
作为 ORMRocket
作为 Web 框架,Seed
作为 [WebAssembly] 前端structopt 是一个库,其通过定义结构体来解析命令行参数。
v0.3 较大的两个变化是:
raw
属性;有关更详细的信息,查看Github
Rust 编写 3D 游戏引擎。它包含的功能:
由于其 API 未稳定,该引擎还没有在crates.io
上发布。
RustCrypto项目,本周发布了4个新的crates,这些是加密算法的纯Rust实现或trait
:
XChaCha20Poly1305
扩展的nonce
变体。trait
,chacha20poly1305
包是根据这些trait
实现的。trait
。自行承担使用风险。一般来说,使用任何加密库的0.1版本,可能是一个非常糟糕的主意。