You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if it's only me. But none of master nor release-0.5 branches does actually compile to wasm (meaning a wasm-target ofc).
In particular, the specific issue happens when compiling wasm-wasix dependency. I thought it had to do with the fact that is actually using the default features.
All this only would work with target wasm32-wasi. The rest are directly not supported due to some of the dependencies not supporting any other wasm-target.
I got an error when compiling using: cargo build --no-default-features --features wasm --target wasm32-wasi
......
error[E0599]: the method `ok` exists for enum `Result<SockAddr, Error>`, but its trait bounds were not satisfied
--> /path/to/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.4.10/src/sockref.rs:144:58
|
144 | .field("peer_addr", &self.socket.peer_addr().ok())
| ^^ method cannot be called on `Result<SockAddr, Error>` due to unsatisfied trait bounds
|
::: /path/to/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.4.10/src/sockaddr.rs:17:1
|
17 | pub struct SockAddr {
| ------------------- doesn't satisfy `SockAddr: Sized`
|
= note: the following trait bounds were not satisfied:
`{type error}: Sized`
which is required by `SockAddr: Sized`
Some errors have detailed explanations: E0061, E0308, E0412, E0422, E0425, E0432, E0433, E0583, E0599.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `socket2` (lib) due to 208 previous errors
This is a big deal specially for projects that depend on this crate to generate their witness inside WASM in the browser.
The text was updated successfully, but these errors were encountered:
CPerezz
added a commit
to CPerezz/circom-compat
that referenced
this issue
Aug 22, 2024
After forcing `wasmer-wasix` to use the `js` feature when the
`circom-compat/js` feature is enabled. As well as forcing `wasmer/js`
and otherwise, `wasmer/default`. The crate can now successfully compile
to wasm.
Resolves: arkworks-rs#73
CPerezz
added a commit
to CPerezz/circom-compat
that referenced
this issue
Aug 22, 2024
After forcing `wasmer-wasix` to use the `js` feature when the
`circom-compat/js` feature is enabled. As well as forcing `wasmer/js`
and otherwise, `wasmer/default`. The crate can now successfully compile
to wasm.
Resolves: arkworks-rs#73
After forcing `wasmer-wasix` to use the `js` feature when the
`circom-compat/js` feature is enabled. As well as forcing `wasmer/js`
and otherwise, `wasmer/default`. The crate can now successfully compile
to wasm.
Resolves: #73
I'm not sure if it's only me. But none of
master
norrelease-0.5
branches does actually compile to wasm (meaning a wasm-target ofc).In particular, the specific issue happens when compiling
wasm-wasix
dependency. I thought it had to do with the fact that is actually using the default features.All this only would work with target
wasm32-wasi
. The rest are directly not supported due to some of the dependencies not supporting any other wasm-target.I got an error when compiling using:
cargo build --no-default-features --features wasm --target wasm32-wasi
This is a big deal specially for projects that depend on this crate to generate their witness inside WASM in the browser.
The text was updated successfully, but these errors were encountered: