Replies: 3 comments 8 replies
-
|
Hi,
ed25519-dalek = { version = "2.0", features = ["rand_core"] }And then enable getrandom = { workspace = true } |
Beta Was this translation helpful? Give feedback.
-
|
after update \packages\core now is "wasm_js" and fill_inner(dest) inner_u32() inner_u64() Compiling aead v0.5.2 error[E0425]: cannot find function error[E0425]: cannot find function error[E0425]: cannot find function For more information about this error, try |
Beta Was this translation helpful? Give feedback.
-
|
Finally resolved the tokio conflict and from the info from oblique and have a compiled realese (after over 7 days!! nightmare) still not sure why getrandom v0.2.16 vs v0.2.15 on libp2p2 tree. maybe this has to do with the (*). Here is the config that could help anyone else to solve WASM integration **root cargo **package\core\Cargo WASM-specific (for browser compatibility) getrandom = { package = "getrandom", version = "0.3.4", features = ["wasm_js"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] **the config for the flag LOG Big THANKS to oblique I really appreciate your answer to allow me to solve this critical piece. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
HI,
trying configure wasm and running with multi conflicts with getrandom and rand_core
libp2p v0.56
issue with these config lines
getrandom = { version = "0.2", features = ["js"] }
rand = { version = "0.8", features = ["getrandom"] }
ed25519-dalek = { version = "2.0", features = ["getrandom"] }
ed25519-dalek = { version = "2.0", features = ["getrandom"] }
global config \Cargo.toml
[workspace.dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
libp2p = { path = "../rust-libp2p/libp2p", features = [
"tcp", "noise", "yamux", "kad", "request-response", "macros", "cbor",
"tokio", # For native builds
"wasm-bindgen", # enables getrandom/js for WASM
"websocket-websys", # WASM-compatible transport
"webtransport-websys" # WASM-compatible transport
] }
tokio = { version = "1.0", features = ["full"] } # this for native builds
wasm-bindgen = "0.2"
js-sys = "0.3"
web-sys = { version = "0.3", features = ["console"] }
uuid = { version = "1.0", features = ["v4"] }
getrandom = { version = "0.2", features = ["js"] }
rand = { version = "0.8", features = ["getrandom"] }
ed25519-dalek = { version = "2.0", features = ["getrandom"] }
libp2p-websocket-websys = { path = "../rust-libp2p/transports/websocket-websys" }
packages\core\Cargo.toml
Tried different config but got Error (see below )
[dependencies]
Core dependencies (work in both WASM and native)
...
#getrandom = { workspace = true }
#ed25519-dalek = { workspace = true, features = ["getrandom"] } # getrandom feature
ed25519-dalek = { workspace = true }
*** Errors
wasm-pack build --target web --out-dir pkg
Error:
cargo metadataexited with an error: error: failed to select a version fored25519-dalek.... required by package
xxxx-core v0.1.0 (C:\APPS3\xxxx-monorepo\packages\core)versions that meet the requirements
^2.0(locked to 2.2.0) are: 2.2.0package
xxxx-coredepends oned25519-dalekwith featuregetrandombuted25519-dalekdoes not have that feature.failed to select a version for
ed25519-dalekwhich could resolve this conflictCaused by:
cargo metadataexited with an error: error: failed to select a version fored25519-dalek.... required by package
xxxx-core v0.1.0 (C:\APPS3\xxxx-monorepo\packages\core)versions that meet the requirements
^2.0(locked to 2.2.0) are: 2.2.0package
xxxx-coredepends oned25519-dalekwith featuregetrandombuted25519-dalekdoes not have that feature.failed to select a version for
ed25519-dalekwhich could resolve this conflictBeta Was this translation helpful? Give feedback.
All reactions