When I try to compile sp1's verifier into wasm, I get a bunch of the same errors. This error is caused by sp1 relying on the reqwest network library, as the mio crate is under the reqwest crate in output of cargo tree.
error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /Users/flyq/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/net/udp.rs:631:20
|
631 | self.inner.reregister(registry, token, interests)
| ^^^^^^^^^^ method not found in `IoSource<UdpSocket>`
|
::: /Users/flyq/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `reregister` not found for this struct
|
= 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
--> /Users/flyq/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/event/source.rs:75:1
|
75 | pub trait Source {
| ^^^^^^^^^^^^^^^^
Compiling typenum v1.17.0
Compiling serde_json v1.0.116
Refer to rics0, which also relies on the reqwest network library, but the reqwest is only used under the dep:bonsai-sdk feature:
When I try to compile sp1's verifier into wasm, I get a bunch of the same errors. This error is caused by sp1 relying on the
reqwest
network library, as themio
crate is under thereqwest
crate in output of cargo tree.Refer to rics0, which also relies on the
reqwest
network library, but thereqwest
is only used under thedep:bonsai-sdk
feature:https://github.com/risc0/risc0/blob/c809f313d9ac84927c5fc683fe12f01c777fecf7/risc0/zkvm/Cargo.toml#L106-L115 So, when I use like this, it can compile to wasm: