-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build wstunnel 9.2.2 #232
Comments
Hello, You need rust 1.75 or higher :) |
Compiled in Ubuntu without any problem with rust 1.76.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When building rust from source getting errors:
Some errors have detailed explanations: E0562, E0706.
For more information about an error, try
rustc --explain E0562
.error: could not compile
wstunnel
(bin "wstunnel") due to 34 previous errorsDo i miss any dependencies to build it?
#Compilation in Windows = success without errors
cargo build #Debug 22mb
cargo build --release # 7mb
To Reproduce
sudo apt install curl git cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/erebe/wstunnel.git
cd wstunnel
cargo build
Expected behavior
Build completed successfully
Screenshots
Desktop (please complete the following information):
Ubuntu 22.04.3 LTS
rustc 1.73.0 (cc66ad468 2023-10-03) (built from a source tarball)
Additional context
user@compiler:~/wstunnel$ cargo build Compiling wstunnel v9.2.2 (/home/user/wstunnel) error[E0706]: functions in traits cannot be declared
async--> src/tunnel/transport/http2.rs:33:5 | 33 | async fn copy(&mut self, mut writer: impl AsyncWrite + Unpin + Send) -> Result<(), io::Error> { | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | |
asyncbecause of this | = note:
asynctrait functions are not currently supported = note: consider using the
async-trait` crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/http2.rs:76:5
|
76 | async fn write(&mut self) -> Result<(), io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/http2.rs:91:5
|
91 | async fn ping(&mut self) -> Result<(), io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/http2.rs:95:5
|
95 | async fn close(&mut self) -> Result<(), io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/websocket.rs:42:5
|
42 | async fn write(&mut self) -> Result<(), io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/websocket.rs:74:5
|
74 | async fn ping(&mut self) -> Result<(), io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/websocket.rs:86:5
|
86 | async fn close(&mut self) -> Result<(), io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/websocket.rs:111:5
|
111 | async fn copy(&mut self, mut writer: impl AsyncWrite + Unpin + Send) -> Result<(), io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0562]:
impl Trait
only allowed in function and inherent method return types, not in trait method return types--> src/tunnel/transport/mod.rs:21:28
|
21 | fn write(&mut self) -> impl Future<Output = Result<(), std::io::Error>> + Send;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0562]:
impl Trait
only allowed in function and inherent method return types, not in trait method return types--> src/tunnel/transport/mod.rs:22:27
|
22 | fn ping(&mut self) -> impl Future<Output = Result<(), std::io::Error>> + Send;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0562]:
impl Trait
only allowed in function and inherent method return types, not in trait method return types--> src/tunnel/transport/mod.rs:23:28
|
23 | fn close(&mut self) -> impl Future<Output = Result<(), std::io::Error>> + Send;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0562]:
impl Trait
only allowed in function and inherent method return types, not in trait method return types--> src/tunnel/transport/mod.rs:30:10
|
30 | ) -> impl Future<Output = Result<(), std::io::Error>> + Send;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/mod.rs:39:5
|
39 | async fn copy(&mut self, writer: impl AsyncWrite + Unpin + Send) -> Result<(), std::io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/mod.rs:60:5
|
60 | async fn write(&mut self) -> Result<(), std::io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/mod.rs:67:5
|
67 | async fn ping(&mut self) -> Result<(), std::io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error[E0706]: functions in traits cannot be declared
async
--> src/tunnel/transport/mod.rs:74:5
|
74 | async fn close(&mut self) -> Result<(), std::io::Error> {
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
|
async
because of this|
= note:
async
trait functions are not currently supported= note: consider using the
async-trait
crate: https://crates.io/crates/async-trait= note: see issue #91611 rust-lang/rust#91611 for more information
error: cannot check whether the hidden type of opaque type satisfies auto traits
--> src/tunnel/client.rs:49:9
|
48 | tokio::spawn(
| ------------ required by a bound introduced by this call
49 | / super::transport::io::propagate_local_to_remote(local_rx, ws_tx, close_tx, Some(ping_freque...
50 | | .instrument(Span::current()),
| |________________________________________^
|
note: opaque type is declared here
--> src/tunnel/transport/io.rs:17:6
|
17 | ) -> anyhow::Result<()> {
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/tunnel/client.rs:18:10
|
18 | async fn connect_to_server<R, W>(
| ^^^^^^^^^^^^^^^^^
note: required because it appears within the type
ManuallyDrop<impl Future<Output = Result<(), Error>>>
--> /build/rustc-Nv44LE/rustc-1.73.0+dfsg0ubuntu1~bpo0/library/core/src/mem/manually_drop.rs:50:12
note: required because it appears within the type
Instrumented<impl Future<Output = Result<(), Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:266:16
|
266 | pub struct Instrumented {
| ^^^^^^^^^^^^
note: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/tunnel/client.rs:83:22
|
83 | tokio::spawn(tunnel);
| ^^^^^^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:23:6
|
23 | ) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/tunnel/client.rs:59:14
|
59 | pub async fn run_tunnel<T, R, W>(client_config: Arc, incoming_cnx: T) -> anyhow::Resu...
| ^^^^^^^^^^
note: future is not
Send
as it awaits another future which is notSend
--> src/tunnel/client.rs:77:21
|
77 | let _ = connect_to_server(request_id, &client_config, &remote_addr, cnx_stream)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
, which is notSend
note: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: cannot check whether the hidden type of opaque type satisfies auto traits
--> src/tunnel/client.rs:156:17
|
155 | ... tokio::spawn(
| ------------ required by a bound introduced by this call
156 | / ... super::transport::io::propagate_local_to_remote(local_rx, ws_tx, close_tx, Some(ping_freq...
157 | | ... .instrument(Span::current()),
| |__________________________________________^
|
note: opaque type is declared here
--> src/tunnel/transport/io.rs:17:6
|
17 | ) -> anyhow::Result<()> {
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/tunnel/client.rs:89:14
|
89 | pub async fn run_reverse_tunnel<F, Fut, T>(
| ^^^^^^^^^^^^^^^^^^
note: required because it appears within the type
ManuallyDrop<impl Future<Output = Result<(), Error>>>
--> /build/rustc-Nv44LE/rustc-1.73.0+dfsg0ubuntu1~bpo0/library/core/src/mem/manually_drop.rs:50:12
note: required because it appears within the type
Instrumented<impl Future<Output = Result<(), Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:266:16
|
266 | pub struct Instrumented {
| ^^^^^^^^^^^^
note: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: cannot check whether the hidden type of opaque type satisfies auto traits
--> src/tunnel/server.rs:415:17
|
414 | ... tokio::task::spawn(
| ------------------ required by a bound introduced by this call
415 | / ... super::transport::io::propagate_remote_to_local(local_tx, WebsocketTunnelRead::new(ws_rx)...
416 | | ... .instrument(Span::current()),
| |__________________________________________^
|
note: opaque type is declared here
--> src/tunnel/transport/io.rs:80:6
|
80 | ) -> anyhow::Result<()> {
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/tunnel/server.rs:338:10
|
338 | async fn ws_server_upgrade(
| ^^^^^^^^^^^^^^^^^
note: required because it appears within the type
ManuallyDrop<impl Future<Output = Result<(), Error>>>
--> /build/rustc-Nv44LE/rustc-1.73.0+dfsg0ubuntu1~bpo0/library/core/src/mem/manually_drop.rs:50:12
note: required because it appears within the type
Instrumented<impl Future<Output = Result<(), Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:266:16
|
266 | pub struct Instrumented {
| ^^^^^^^^^^^^
note: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: cannot check whether the hidden type of opaque type satisfies auto traits
--> src/tunnel/server.rs:509:17
|
508 | ... tokio::task::spawn(
| ------------------ required by a bound introduced by this call
509 | / ... super::transport::io::propagate_remote_to_local(local_tx, Http2TunnelRead::new(ws_rx), cl...
510 | | ... .instrument(Span::current()),
| |__________________________________________^
|
note: opaque type is declared here
--> src/tunnel/transport/io.rs:80:6
|
80 | ) -> anyhow::Result<()> {
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/tunnel/server.rs:447:10
|
447 | async fn http_server_upgrade(
| ^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type
ManuallyDrop<impl Future<Output = Result<(), Error>>>
--> /build/rustc-Nv44LE/rustc-1.73.0+dfsg0ubuntu1~bpo0/library/core/src/mem/manually_drop.rs:50:12
note: required because it appears within the type
Instrumented<impl Future<Output = Result<(), Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:266:16
|
266 | pub struct Instrumented {
| ^^^^^^^^^^^^
note: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: cannot check whether the hidden type of opaque type satisfies auto traits
--> src/tunnel/server.rs:656:85
|
656 | ... let con_fut = conn_builder.serve_connection(tls_stream, service_fn(http_upgrade_fn));
| ---------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| required by a bound introduced by this call
|
note: opaque type is declared here
--> src/tunnel/server.rs:451:6
|
451 | ) -> Response<Either<String, BoxBody<Bytes, anyhow::Error>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/tunnel/server.rs:557:14
|
557 | pub async fn run_server(server_config: Arc) -> anyhow::Result<()> {
| ^^^^^^^^^^
note: required because it appears within the type
Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/future/map.rs:15:14
|
15 | pub enum Map<Fut, F> {
| ^^^
note: required because it appears within the type
Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/future/mod.rs:50:5
|
50 | Map<Fut, F>(
| ^^^
note: required because it appears within the type
H2StreamState<Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>, Either<String, BoxBody<Bytes, Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-1.1.0/src/proto/h2/server.rs:357:10
|
357 | enum H2StreamState<F, B>
| ^^^^^^^^^^^^^
note: required because it appears within the type
H2Stream<Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>, Either<String, BoxBody<Bytes, Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-1.1.0/src/proto/h2/server.rs:345:16
|
345 | pub struct H2Stream<F, B>
| ^^^^^^^^
= note: required for
TokioExecutor
to implementhyper::rt::Executor<hyper::proto::h2::server::H2Stream<futures_util::future::Map<impl futures_util::Future<Output = hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>>, fn(hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>) -> Result<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error> {Result::<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error>::Ok}>, http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>>
= note: required for
TokioExecutor
to implementHttp2ServerConnExec<futures_util::future::Map<impl futures_util::Future<Output = hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>>, fn(hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>) -> Result<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error> {Result::<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error>::Ok}>, http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>
note: required by a bound in
hyper::server::conn::http2::Builder::<E>::serve_connection
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-1.1.0/src/server/conn/http2.rs:265:12
|
258 | pub fn serve_connection<S, I, Bd>(&self, io: I, service: S) -> Connection<I, S, E>
| ---------------- required by a bound in this associated function
...
265 | E: Http2ServerConnExec<S::Future, Bd>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in
Builder::<E>::serve_connection
error: cannot check whether the hidden type of opaque type satisfies auto traits
--> src/tunnel/server.rs:657:53
|
657 | ... if let Err(e) = con_fut.await {
| ^^^^^
|
note: opaque type is declared here
--> src/tunnel/server.rs:451:6
|
451 | ) -> Response<Either<String, BoxBody<Bytes, anyhow::Error>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/tunnel/server.rs:557:14
|
557 | pub async fn run_server(server_config: Arc) -> anyhow::Result<()> {
| ^^^^^^^^^^
note: required because it appears within the type
Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/future/map.rs:15:14
|
15 | pub enum Map<Fut, F> {
| ^^^
note: required because it appears within the type
Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/future/mod.rs:50:5
|
50 | Map<Fut, F>(
| ^^^
note: required because it appears within the type
H2StreamState<Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>, Either<String, BoxBody<Bytes, Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-1.1.0/src/proto/h2/server.rs:357:10
|
357 | enum H2StreamState<F, B>
| ^^^^^^^^^^^^^
note: required because it appears within the type
H2Stream<Map<impl Future<Output = Response<Either<String, BoxBody<Bytes, Error>>>>, fn(Response<Either<String, BoxBody<Bytes, Error>>>) -> Result<Response<Either<String, BoxBody<Bytes, Error>>>, Error> {Result::<Response<Either<String, BoxBody<Bytes, Error>>>, Error>::Ok}>, Either<String, BoxBody<Bytes, Error>>>
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-1.1.0/src/proto/h2/server.rs:345:16
|
345 | pub struct H2Stream<F, B>
| ^^^^^^^^
= note: required for
TokioExecutor
to implementhyper::rt::Executor<hyper::proto::h2::server::H2Stream<futures_util::future::Map<impl futures_util::Future<Output = hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>>, fn(hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>) -> Result<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error> {Result::<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error>::Ok}>, http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>>
= note: required for
TokioExecutor
to implementHttp2ServerConnExec<futures_util::future::Map<impl futures_util::Future<Output = hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>>, fn(hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>) -> Result<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error> {Result::<hyper::Response<http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>, anyhow::Error>::Ok}>, http_body_util::Either<std::string::String, BoxBody<bytes::Bytes, anyhow::Error>>>
= note: required for
Connection<TokioIo<TlsStream<TcpStream>>, ServiceFn<..., ...>, ...>
to implementfutures_util::Future
= note: the full type name has been written to '/home/user/wstunnel/target/debug/deps/wstunnel-40bf6074578ce8e3.long-type-12316116632852263644.txt'
= note: required for
Connection<TokioIo<TlsStream<TcpStream>>, ServiceFn<..., ...>, ...>
to implementstd::future::IntoFuture
= note: the full type name has been written to '/home/user/wstunnel/target/debug/deps/wstunnel-40bf6074578ce8e3.long-type-12316116632852263644.txt'
error: future cannot be sent between threads safely
--> src/main.rs:772:38
|
772 | tokio::spawn(async move {
| ______________________________________^
773 | | let remote = tunnel.remote.clone();
774 | | let cfg = client_config.clone();
775 | | let connect_to_dest = || async {
... |
796 | | }
797 | | });
| |________________________^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:93:6
|
93 | ) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:793:108
|
793 | ... tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest).await
| -------------------------------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
797 | ... });
| -
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:802:38
|
802 | tokio::spawn(async move {
| ______________________________________^
803 | | let cfg = client_config.clone();
804 | | let (host, port) = to_host_port(tunnel.local);
805 | | let remote = RemoteAddr {
... |
819 | | }
820 | | });
| |_________________________^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:93:6
|
93 | ) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:816:108
|
816 | ... tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest).await
| -------------------------------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
820 | ... });
| -
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:827:38
|
827 | tokio::spawn(async move {
| ______________________________________^
828 | | let cfg = client_config.clone();
829 | | let (host, port) = to_host_port(tunnel.local);
830 | | let remote = RemoteAddr {
... |
864 | | }
865 | | });
| |_________________________^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:93:6
|
93 | ) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:861:108
|
861 | ... tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest).await
| -------------------------------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
865 | ... });
| -
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:870:38
|
870 | tokio::spawn(async move {
| ______________________________________^
871 | | let remote = tunnel.remote.clone();
872 | | let cfg = client_config.clone();
873 | | let connect_to_dest = || async {
... |
894 | | }
895 | | });
| |________________________^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:93:6
|
93 | ) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:891:108
|
891 | ... tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest).await
| -------------------------------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
895 | ... });
| -
tunnel::client::run_reverse_tunnel(client_config, remote, connect_to_dest)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:933:38
|
933 | ... tokio::spawn(async move {
| ____________________^
934 | | ... if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
935 | | ... error!("{:?}", err);
936 | | ... }
937 | | ... });
| |_______^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:59:90
|
59 | ...rc, incoming_cnx: T) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:934:97
|
934 | if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
| ------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_tunnel(client_config, server)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
937 | });
| -
tunnel::client::run_tunnel(client_config, server)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:956:38
|
956 | ... tokio::spawn(async move {
| ____________________^
957 | | ... if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
958 | | ... error!("{:?}", err);
959 | | ... }
960 | | ... });
| |_______^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:59:90
|
59 | ...rc, incoming_cnx: T) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:957:97
|
957 | if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
| ------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_tunnel(client_config, server)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
960 | });
| -
tunnel::client::run_tunnel(client_config, server)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:980:38
|
980 | ... tokio::spawn(async move {
| ____________________^
981 | | ... if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
982 | | ... error!("{:?}", err);
983 | | ... }
984 | | ... });
| |_______^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:59:90
|
59 | ...rc, incoming_cnx: T) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:981:97
|
981 | if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
| ------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_tunnel(client_config, server)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
984 | });
| -
tunnel::client::run_tunnel(client_config, server)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:1012:38
|
1012 | ... tokio::spawn(async move {
| ____________________^
1013 | | ... if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
1014 | | ... error!("{:?}", err);
1015 | | ... }
1016 | | ... });
| |_______^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:59:90
|
59 | ...c, incoming_cnx: T) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:1013:97
|
1013 | if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
| ------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_tunnel(client_config, server)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
1016 | });
| -
tunnel::client::run_tunnel(client_config, server)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:1038:38
|
1038 | ... tokio::spawn(async move {
| ____________________^
1039 | | ... if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
1040 | | ... error!("{:?}", err);
1041 | | ... }
1042 | | ... });
| |_______^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:59:90
|
59 | ...c, incoming_cnx: T) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:1039:97
|
1039 | if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
| ------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_tunnel(client_config, server)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
1042 | });
| -
tunnel::client::run_tunnel(client_config, server)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:1057:38
|
1057 | ... tokio::spawn(async move {
| ____________________^
1058 | | ... if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
1059 | | ... error!("{:?}", err);
1060 | | ... }
1061 | | ... });
| |_______^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:59:90
|
59 | ...c, incoming_cnx: T) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:1058:97
|
1058 | if let Err(err) = tunnel::client::run_tunnel(client_config, server).await {
| ------------------------------------------------- ^^^^^ await occurs here, with
tunnel::client::run_tunnel(client_config, server)
maybe used later| |
| has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
...
1061 | });
| -
tunnel::client::run_tunnel(client_config, server)
is later dropped herenote: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
error: future cannot be sent between threads safely
--> src/main.rs:1068:38
|
1068 | tokio::spawn(async move {
| ______________________________________^
1069 | | if let Err(err) = tunnel::client::run_tunnel(
1070 | | client_config,
1071 | | stream::once(async move {
... |
1083 | | }
1084 | | });
| |_________________________^ future created by async block is not
Send
|
note: opaque type is declared here
--> src/tunnel/client.rs:59:90
|
59 | ...c, incoming_cnx: T) -> anyhow::Result<()>
| ^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
--> src/main.rs:651:10
|
651 | async fn main() {
| ^^^^
note: future is not
Send
as this value is used across an await--> src/main.rs:1080:30
|
1069 | if let Err(err) = tunnel::client::run_tunnel(
| __________________-
1070 | | client_config,
1071 | | stream::once(async move {
1072 | | let remote = RemoteAddr {
... |
1078 | | }),
1079 | | )
| |- has type
impl futures_util::Future<Output = Result<(), anyhow::Error>>
which is notSend
1080 | .await
| ^^^^^ await occurs here, with the value maybe used later
...
1084 | });
| - the value is later dropped here
note: required by a bound in
tokio::spawn
--> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/task/spawn.rs:166:21
|
164 | pub fn spawn(future: F) -> JoinHandle<F::Output>
| ----- required by a bound in this function
165 | where
166 | F: Future + Send + 'static,
| ^^^^ required by this bound in
spawn
Some errors have detailed explanations: E0562, E0706.
For more information about an error, try
rustc --explain E0562
.error: could not compile
wstunnel
(bin "wstunnel") due to 34 previous errors`
The text was updated successfully, but these errors were encountered: