Skip to content

Instantly share code, notes, and snippets.

@noandrea
Last active June 28, 2021 10:52
Show Gist options
  • Save noandrea/ce571ece948e309c54c4ce5958c3c3c2 to your computer and use it in GitHub Desktop.
Save noandrea/ce571ece948e309c54c4ce5958c3c3c2 to your computer and use it in GitHub Desktop.
wasm rust grpc tonic tls error
[package.metadata.wasm-pack.profile.release]
wasm-opt = ['-Os']
[profile.release]
lto = true
opt-level = 'z'
codegen-units = 1
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["cdylib", "lib"]
[dependencies]
hex = "0.4.3"
hmac = "0.11.0"
sha2 = "0.9.5"
wasm-bindgen = { version = "0.2.73", default-features = false, features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.24"
tonic = { version = "0.4.3", default-features = false, features = ["codegen", "prost", "tls", "tls-roots"] } # tls deps bring socket2 that causes the build to fail
grpc-web-client = "0.1.2"
prost = { version = "0.7.0", default-features = false }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
[dev-dependencies]
wasm-bindgen-test = "0.3.23"
tokio-test = "0.4.2"
[build-dependencies]
tonic-build = { version = "0.4.2", default-features = false, features = ["prost"] }
wasm-pack build --release --target web --out-dir=webui/pkg
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
Compiling socket2 v0.4.0
Compiling mio v0.7.13
Compiling tracing-futures v0.2.5
Compiling web-sys v0.3.51
Compiling getrandom v0.2.3
Compiling cosmos-cash-credentials v0.1.0 (/home/andrea/Documents/workspaces/tendermint/cosmos-cash-credentials)
error[E0432]: unresolved import `crate::sys::IoSourceState`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:12:5
|
12 | use crate::sys::IoSourceState;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`
error[E0433]: failed to resolve: could not find `Selector` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/poll.rs:354:18
|
354 | sys::Selector::new().map(|selector| Poll {
| ^^^^^^^^ could not find `Selector` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:24:14
|
24 | sys::event::token(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0432]: unresolved import `crate::sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sockaddr.rs:5:12
|
5 | use crate::sys::{
| ^^^
| |
| unresolved import
| help: a similar path exists: `crate::socket::io::sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:29:14
|
29 | sys::event::is_readable(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:34:14
|
34 | sys::event::is_writable(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0432]: unresolved imports `crate::sys`, `crate::sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/socket.rs:21:12
|
21 | use crate::sys::{self, c_int, getsockopt, setsockopt, Bool};
| ^^^ ^^^^ no `sys` in the root
| |
| unresolved import
| help: a similar path exists: `crate::socket::io::sys`
error[E0432]: unresolved import `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:129:5
|
129 | use sys::c_int;
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:59:14
|
59 | sys::event::is_error(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:90:14
|
90 | sys::event::is_read_closed(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: unresolved import
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sockaddr.rs:114:29
|
114 | let ip = crate::sys::from_in_addr(addr.sin_addr);
| ^^^
| |
| unresolved import
| help: a similar path exists: `crate::socket::io::sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:120:14
|
120 | sys::event::is_write_closed(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: unresolved import
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sockaddr.rs:121:29
|
121 | let ip = crate::sys::from_in6_addr(addr.sin6_addr);
| ^^^
| |
| unresolved import
| help: a similar path exists: `crate::socket::io::sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:142:14
|
142 | sys::event::is_priority(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:164:14
|
164 | sys::event::is_aio(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: unresolved import
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sockaddr.rs:172:30
|
172 | sin_addr: crate::sys::to_in_addr(&addr.ip()),
| ^^^
| |
| unresolved import
| help: a similar path exists: `crate::socket::io::sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:174:14
|
174 | sys::event::is_lio(&self.inner)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: unresolved import
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sockaddr.rs:207:31
|
207 | sin6_addr: crate::sys::to_in6_addr(addr.ip()),
| ^^^
| |
| unresolved import
| help: a similar path exists: `crate::socket::io::sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:149:37
|
149 | pub const IPV4: Domain = Domain(sys::AF_INET);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:152:37
|
152 | pub const IPV6: Domain = Domain(sys::AF_INET6);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:191:35
|
191 | pub const STREAM: Type = Type(sys::SOCK_STREAM);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:196:34
|
196 | pub const DGRAM: Type = Type(sys::SOCK_DGRAM);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:231:43
|
231 | pub const ICMPV4: Protocol = Protocol(sys::IPPROTO_ICMP);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:234:43
|
234 | pub const ICMPV6: Protocol = Protocol(sys::IPPROTO_ICMPV6);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:237:40
|
237 | pub const TCP: Protocol = Protocol(sys::IPPROTO_TCP);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:240:40
|
240 | pub const UDP: Protocol = Protocol(sys::IPPROTO_UDP);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:272:18
|
272 | self.0 & sys::MSG_TRUNC != 0
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: could not find `event` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:212:26
|
212 | sys::event::debug_details(f, self.0)
| ^^^^^ could not find `event` in `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:280:33
|
280 | pub struct MaybeUninitSlice<'a>(sys::MaybeUninitSlice<'a>);
| ^^^ use of undeclared crate or module `sys`
error[E0433]: failed to resolve: use of undeclared crate or module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:299:31
|
299 | MaybeUninitSlice(sys::MaybeUninitSlice::new(buf))
| ^^^^^^^^^^^^^^^^ not found in `sys`
|
help: consider importing this struct
|
62 | use crate::socket::MaybeUninitSlice;
|
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/listener.rs:91:18
|
91 | sys::tcp::accept(inner).map(|(stream, addr)| (TcpStream::from_std(stream), addr))
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:22:15
|
22 | sys: sys::tcp::TcpSocket,
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:53:14
|
53 | sys::tcp::new_v4_socket().map(|sys| TcpSocket { sys })
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:60:14
|
60 | sys::tcp::new_v6_socket().map(|sys| TcpSocket { sys })
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:73:14
|
73 | sys::tcp::bind(self.sys, addr)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:82:27
|
82 | let stream = sys::tcp::connect(self.sys, addr)?;
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:92:29
|
92 | let listener = sys::tcp::listen(self.sys, backlog)?;
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:101:14
|
101 | sys::tcp::set_reuseaddr(self.sys, reuseaddr)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:106:14
|
106 | sys::tcp::get_reuseaddr(self.sys)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:125:14
|
125 | sys::tcp::set_linger(self.sys, dur)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:130:14
|
130 | sys::tcp::get_linger(self.sys)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:135:14
|
135 | sys::tcp::set_recv_buffer_size(self.sys, size)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:159:14
|
159 | sys::tcp::get_recv_buffer_size(self.sys)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:164:14
|
164 | sys::tcp::set_send_buffer_size(self.sys, size)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:188:14
|
188 | sys::tcp::get_send_buffer_size(self.sys)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:195:14
|
195 | sys::tcp::set_keepalive(self.sys, keepalive)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:200:14
|
200 | sys::tcp::get_keepalive(self.sys)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:242:14
|
242 | sys::tcp::set_keepalive_params(self.sys, keepalive)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:260:14
|
260 | sys::tcp::get_keepalive_time(self.sys)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:328:14
|
328 | sys::tcp::get_localaddr(self.sys)
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `tcp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/socket.rs:334:14
|
334 | sys::tcp::close(self.sys);
| ^^^ could not find `tcp` in `sys`
error[E0433]: failed to resolve: could not find `udp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/udp.rs:122:14
|
122 | sys::udp::bind(addr).map(UdpSocket::from_std)
| ^^^ could not find `udp` in `sys`
error[E0433]: failed to resolve: could not find `udp` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/udp.rs:517:14
|
517 | sys::udp::only_v6(&self.inner)
| ^^^ could not find `udp` in `sys`
error[E0412]: cannot find type `Selector` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/poll.rs:210:20
|
210 | selector: sys::Selector,
| ^^^^^^^^ not found in `sys`
error[E0412]: cannot find type `Selector` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/poll.rs:647:54
|
647 | pub(crate) fn selector(registry: &Registry) -> &sys::Selector {
| ^^^^^^^^ not found in `sys`
error[E0412]: cannot find type `Waker` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/waker.rs:79:17
|
79 | inner: sys::Waker,
| ^^^^^ not found in `sys`
|
help: consider importing one of these items
|
1 | use core::task::Waker;
|
1 | use crate::Waker;
|
1 | use std::task::Waker;
|
error[E0433]: failed to resolve: could not find `Waker` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/waker.rs:87:14
|
87 | sys::Waker::new(poll::selector(&registry), token).map(|inner| Waker { inner })
| ^^^^^ not found in `sys`
|
help: consider importing one of these items
|
1 | use core::task::Waker;
|
1 | use crate::Waker;
|
1 | use std::task::Waker;
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:18:17
|
18 | inner: sys::Event,
| ^^^^^ not found in `sys`
|
help: consider importing this struct
|
1 | use crate::event::Event;
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:178:55
|
178 | pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
| ^^^^^ not found in `sys`
|
help: consider importing this struct
|
1 | use crate::event::Event;
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:182:41
|
182 | &*(sys_event as *const sys::Event as *const Event)
| ^^^^^ not found in `sys`
|
help: consider importing this struct
|
1 | use crate::event::Event;
|
error[E0412]: cannot find type `Event` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/event.rs:208:46
|
208 | struct EventDetails<'a>(&'a sys::Event);
| ^^^^^ not found in `sys`
|
help: consider importing this struct
|
1 | use crate::event::Event;
|
error[E0412]: cannot find type `Events` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/events.rs:43:17
|
43 | inner: sys::Events,
| ^^^^^^ not found in `sys`
|
help: consider importing this struct
|
1 | use crate::Events;
|
error[E0433]: failed to resolve: could not find `Events` in `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/events.rs:94:25
|
94 | inner: sys::Events::with_capacity(capacity),
| ^^^^^^ not found in `sys`
|
help: consider importing this struct
|
1 | use crate::Events;
|
error[E0412]: cannot find type `Events` in module `sys`
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/events.rs:189:47
|
189 | pub(crate) fn sys(&mut self) -> &mut sys::Events {
| ^^^^^^ not found in `sys`
|
help: consider importing this struct
|
1 | use crate::Events;
|
error[E0308]: mismatched types
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/socket.rs:1451:23
|
1451 | from!(net::TcpStream, Socket);
| ^^^^^^ expected struct `Socket`, found `()`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/socket.rs:1452:25
|
1452 | from!(net::TcpListener, Socket);
| ^^^^^^ expected struct `Socket`, found `()`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/socket.rs:1453:23
|
1453 | from!(net::UdpSocket, Socket);
| ^^^^^^ expected struct `Socket`, found `()`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/socket.rs:1454:15
|
1454 | from!(Socket, net::TcpStream);
| ^^^^^^^^^^^^^^ expected struct `TcpStream`, found `()`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/socket.rs:1455:15
|
1455 | from!(Socket, net::TcpListener);
| ^^^^^^^^^^^^^^^^ expected struct `TcpListener`, found `()`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/socket.rs:1456:15
|
1456 | from!(Socket, net::UdpSocket);
| ^^^^^^^^^^^^^^ expected struct `UdpSocket`, found `()`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs:104:16
|
104 | fn from(socket: $from) -> $for {
| ---- implicitly returns `()` as its body has no tail or `return` expression
error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpListener>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/listener.rs:134:20
|
134 | self.inner.register(registry, token, interests)
| ^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `register` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/listener.rs:143:20
|
143 | self.inner.reregister(registry, token, interests)
| ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `reregister` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/listener.rs:147:20
|
147 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `deregister` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0061]: this function takes 4 arguments but 3 arguments were supplied
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sockaddr.rs:123:33
|
123 | Some(SocketAddr::V6(SocketAddrV6::new(
| ^^^^^^^^^^^^^^^^^ expected 4 arguments
124 | ip,
| --
125 | port,
| ----
126 | addr.sin6_flowinfo,
| ------------------ supplied 3 arguments
|
note: associated function defined here
--> /home/andrea/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/net/addr.rs:359:12
|
359 | pub fn new(ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32) -> SocketAddrV6 {
| ^^^
error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpStream>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/stream.rs:230:20
|
230 | self.inner.register(registry, token, interests)
| ^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `register` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/stream.rs:239:20
|
239 | self.inner.reregister(registry, token, interests)
| ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `reregister` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/tcp/stream.rs:243:20
|
243 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `deregister` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `register` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/udp.rs:537:20
|
537 | self.inner.register(registry, token, interests)
| ^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `register` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/udp.rs:546:20
|
546 | self.inner.reregister(registry, token, interests)
| ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `reregister` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/net/udp.rs:550:20
|
550 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
|
::: /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `deregister` not found for this
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
--> /home/andrea/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
error: aborting due to 25 previous errors
Some errors have detailed explanations: E0061, E0308, E0432, E0433.
For more information about an error, try `rustc --explain E0061`.
error: aborting due to 55 previous errors
Some errors have detailed explanations: E0412, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `mio`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit code: 101
full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
make: *** [Makefile:83: wasm-build] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment