packtpublishing / hands-on-microservices-with-rust Goto Github PK
View Code? Open in Web Editor NEWHands-On Microservices with Rust 2018, published by Packt
License: MIT License
Hands-On Microservices with Rust 2018, published by Packt
License: MIT License
bash-3.2$ git clone https://github.com/PacktPublishing/Hands-On-Microservices-with-Rust.git
Cloning into 'Hands-On-Microservices-with-Rust'...
remote: Enumerating objects: 63, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 1152 (delta 12), reused 25 (delta 7), pack-reused 1089
Receiving objects: 100% (1152/1152), 3.83 MiB | 8.42 MiB/s, done.
Resolving deltas: 100% (417/417), done.
bash-3.2$ cd Hands-On-Microservices-with-Rust/Chapter06/grpc-ring/
bash-3.2$ cargo build
Updating crates.io index
Updating git repository https://github.com/stepancheg/grpc-rust
Updating git repository https://github.com/stepancheg/rust-http2
Compiling libc v0.2.51
Compiling semver-parser v0.7.0
Compiling autocfg v0.1.2
Compiling rand_core v0.4.0
Compiling arrayvec v0.4.10
Compiling byteorder v1.3.1
Compiling stable_deref_trait v1.1.1
Compiling lazy_static v1.3.0
Compiling cfg-if v0.1.7
Compiling nodrop v0.1.13
Compiling smallvec v0.6.9
Compiling memoffset v0.2.1
Compiling scopeguard v0.3.3
Compiling slab v0.4.2
Compiling lazycell v1.2.1
Compiling futures v0.1.25
Compiling fnv v1.0.6
Compiling protobuf v2.4.2
Compiling proc-macro2 v0.4.27
Compiling unicode-xid v0.1.0
Compiling syn v0.15.29
Compiling remove_dir_all v0.5.1
Compiling memchr v2.2.0
Compiling scoped-tls v0.1.2
Compiling slab v0.3.0
Compiling failure_derive v0.1.5
Compiling ucd-util v0.1.3
Compiling void v1.0.2
Compiling regex v1.1.5
Compiling httpbis v0.8.0 (https://github.com/stepancheg/rust-http2#ff3d0720)
Compiling safemem v0.3.0
Compiling rustc-demangle v0.1.13
Compiling quick-error v1.2.2
Compiling utf8-ranges v1.0.2
Compiling termcolor v1.0.4
Compiling owning_ref v0.4.0
Compiling tokio-trace-core v0.1.0
Compiling thread_local v0.3.6
Compiling crossbeam-utils v0.6.5
Compiling log v0.4.6
Compiling rand_core v0.3.1
Compiling rand_chacha v0.1.1
Compiling rand_pcg v0.1.2
Compiling rand v0.6.5
Compiling backtrace v0.3.14
Compiling semver v0.9.0
Compiling regex-syntax v0.6.6
Compiling humantime v1.2.0
Compiling lock_api v0.1.5
Compiling rand_isaac v0.1.1
Compiling rand_hc v0.1.0
Compiling rand_xorshift v0.1.1
Compiling protoc v2.4.2
Compiling log v0.3.9
Compiling tls-api v0.1.20
Compiling log-ndc v0.2.0
Compiling crossbeam-queue v0.1.2
Compiling rustc_version v0.2.3
Compiling tls-api-stub v0.1.20
Compiling rand_jitter v0.1.3
Compiling rand_os v0.1.3
Compiling iovec v0.1.2
Compiling net2 v0.2.33
Compiling num_cpus v1.10.0
Compiling rand v0.4.6
Compiling rand v0.5.6
Compiling unix_socket v0.5.0
Compiling atty v0.2.11
Compiling crossbeam-epoch v0.7.1
Compiling base64 v0.9.3
Compiling tokio-sync v0.1.4
Compiling tokio-executor v0.1.7
Compiling tokio-timer v0.1.2
Compiling parking_lot_core v0.4.0
Compiling aho-corasick v0.7.3
Compiling bytes v0.4.12
Compiling futures-cpupool v0.1.8
Compiling mio v0.6.16
Compiling quote v0.6.11
Compiling crossbeam-deque v0.7.1
Compiling tempdir v0.3.7
Compiling tokio-current-thread v0.1.6
Compiling tokio-timer v0.2.10
Compiling tokio-io v0.1.12
Compiling mio-uds v0.6.7
Compiling tokio-codec v0.1.1
Compiling tokio-threadpool v0.1.13
Compiling tempfile v3.0.7
Compiling parking_lot v0.7.1
Compiling tokio-fs v0.1.6
Compiling env_logger v0.6.1
Compiling tokio-reactor v0.1.9
Compiling protobuf-codegen v2.4.2
Compiling synstructure v0.10.1
Compiling tokio-tcp v0.1.3
Compiling tokio-udp v0.1.3
Compiling tokio-uds v0.2.5
Compiling tokio v0.1.18
Compiling tokio-core v0.1.17
Compiling protoc-rust v2.4.2
Compiling grpc-compiler v0.7.0 (https://github.com/stepancheg/grpc-rust#0f1faf9d)
Compiling protoc-rust-grpc v0.7.0 (https://github.com/stepancheg/grpc-rust#0f1faf9d)
Compiling failure v0.1.5
Compiling grpc-ring v0.1.0 (/Users/cody/projects/Hands-On-Microservices-with-Rust/Chapter06/grpc-ring)
Compiling tokio-uds v0.1.7
Compiling tokio-tls-api v0.1.20
Compiling grpc v0.7.0 (https://github.com/stepancheg/grpc-rust#0f1faf9d)
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:49:64
|
49 | req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:50:65
|
50 | resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:59:64
|
59 | req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:60:65
|
60 | resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:80:76
|
80 | req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:81:77
|
81 | resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:92:76
|
92 | req_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
error[E0433]: failed to resolve: could not find grpc_protobuf
in {{root}}
--> src/ring_grpc.rs:93:77
|
93 | resp_marshaller: ::grpc::rt::ArcOrStatic::Static(&::grpc_protobuf::MarshallerProtobuf),
| ^^^^^^^^^^^^^ could not find grpc_protobuf
in {{root}}
warning: unused import: Ring
--> src/lib.rs:5:24
|
5 | use crate::ring_grpc::{Ring, RingClient};
| ^^^^
|
= note: #[warn(unused_imports)] on by default
error: aborting due to 8 previous errors
For more information about this error, try rustc --explain E0433
.
error: Could not compile grpc-ring
.
To learn more, run the command again with --verbose.
queue_actor.rs
76 | impl<T: QueueHandler> StreamHandler<Delivery, LapinError> for QueueActor<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `queue_actor::QueueActor<T>`, the trait `std::marker::Unpin` is not implemented for `T`
This can be reproduced by doing a 'cargo build' at the mails folder.
(base) Hands-On-Microservices-with-Rust/Chapter15/deploy/microservices/mails$ cargo build
Updating crates.io index
Updating git repository https://github.com/lettre/lettre
error: no matching package named lettre_email
found
location searched: https://github.com/lettre/lettre
required by package mails-microservice v0.1.0 (/home/tankh/projects/github/khtan-private/rust/Hands-On-Microservices-with-Rust/Chapter15/deploy/microservices/mails)
This seems to suggest a typo(?) in mails/Cargo.toml :
[dependencies]
...
lettre = { git = "https://github.com/lettre/lettre" }
lettre_email = { git = "https://github.com/lettre/lettre" }
Below are the versions of my Linux toolset:
Docker version 20.10.5, build 55c4c88
docker-compose version 1.21.2, build a133471
cargo 1.52.0-nightly (c68432f1e 2021-03-02)
rustc 1.52.0-nightly (51748a8fc 2021-03-05)
rustdoc 1.52.0-nightly (51748a8fc 2021-03-05)
First of all, I have to say this This book is ABSOLUTELY AMAZING!. Congrats for this amazing work Denis!
Is there any plan to make a Second Edition updating it to async/await syntax now that is a stable rust feature?
Thanks!
Hands-On-Microservices-with-Rust/Chapter12
2 | use actix::fut::wrap_future;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0277]: the trait bound `queue_actor::QueueActor<T>: actix::Actor` is not satisfied
--> src/queue_actor.rs:41:59
|
41 | pub fn new(handler: T, mut sys: &mut SystemRunner) -> Result<Addr<Self>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `actix::Actor` is not implemented for `queue_actor::QueueActor<T>`
|
:::~l/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-0.10.0/src/address/mod.rs:72:20
|
72 | pub struct Addr<A: Actor> {
| ----- required by this bound in `actix::Addr`
Hello,
thank you for the wonder book. I was hoping that you can update chapter 6 code. Currently the jsonrpc examople doesn't work. I get the following message for the compiler:
error[E0107]: wrong number of type arguments: expected 1, found 0
--> src/main.rs:19:13
|
19 | client: Client
| ^^^^^^ expected 1 type argument
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.