先创建项目,然后再添加依赖 >cargo new thumbor && cd thumbor>cargo add axum anyhow base64 bytes image lazy_static lru percent-encoding photon-rs prost reqwest serde tokio tower tower-http tracing tracing-subscriber prost-build 最后Cargo.toml文件像这样:[dependencies]anyhow = "1.0.64" # 错误处理...
Compiling glob v0.3.0 Compiling percent-encoding v2.1.0 Compiling crc32fast v1.2.1 Compiling ryu v1.0.5 Compiling adler v1.0.2 Compiling ppv-lite86 v0.2.10 Compiling crossbeam-epoch v0.9.5 Compiling regex-syntax v0.6.25 Compiling bitflags v1.2.1 Compiling mime v0.3.16 Compiling typenum v1...
percent-encoding = "2" port_check = "0.1" regex = "1" rustls = { version = "0.20", optional = true } rustls-pemfile = { version = "1.0", optional = true } serde = { version = "1", features = ["derive"] } sha2 = "0.10" simplelog = "0.12" socket2 = "0.4" strum ...
>cargo new thumbor && cd thumbor >cargo add axum anyhow base64 bytes image lazy_static lru percent-encoding photon-rs prost reqwest serde tokio tower tower-http tracing tracing-subscriber prost-build 最后Cargo.toml文件像这样: [dependencies] anyhow = "1.0.64" # 错误处理 axum = "0.5.15" ...
"percent-encoding", ] [[package]] name = "user-defined-types" version = "0.1.0" [[package]] name = "utf-8" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7...
name = "percent-encoding" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "perf-event-open-sys" version = "3.0.0" source = "registry+ht...
"percent-encoding", "rand", "thiserror", "tokio", "tokio-stream", ] [[package]] name = "ordered-float" version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "536900a8093134cf9ccf00a27deb3532421099e958d9dd431135d0c7543ca1e8" dependencies =...
"percent-encoding", ] [[package]] name = "futures-channel" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", ] ...
percent-encoding = "1.0.1" Your Cargo.toml should now have all of the crates we plan on using. When we build our project, Rust will automatically install these dependencies. The next file is src -> main.rs, your main Rust code file. Here is where your main function is, in addition ...
Compiling percent-encoding v2.1.0 Compiling generic-array v0.14.6 Compiling slab v0.4.7 Compiling tokio v1.20.1 Compiling lock_api v0.4.7 Compiling tinyvec v1.6.0 Compiling tracing-core v0.1.29 Compiling phf_shared v0.10.0 Compiling phf v0.10.1 ...