Open godadada opened 5 years ago
This is because slice_deque
doesn't support building for WASM. I'll need to fix that.
In the meantime, try cargo web build --no-default-features
.
I tried the command with the new option, got same error. Could you share any schedule that WASM support may be available?
Thanks
Sorry, you actually need to set default-features = false
for the buf_redux
dependency in your Cargo.toml
:
# before
buf_redux = "0.8"
# after
buf_redux = { version = "0.8", default-features = false }
It should be a trivial fix but I need to install cargo-web to test it, I haven't gotten around to it yet.
My program uses rpgp which depends on buf_redux. I see in rpgp's Cargo.toml file having following entries:
[dependencies.buf_redux] version = "0.8.1" default-features = false ..... [features] default = ["ringbuf"] ringbuf = ["buf_redux/default"]
I do not know if I can change my App's Cargo.toml to have any impact, but tried anyway with same error.
please advise.
Try doing the same with your dependency on rpgp.
Okay. That nailed it. In case anyone else has similar issue, I used following entry in Cargo.toml:
pgp = { version = "*", default-features = false }
Thanks again.
I have a web client rust app that needs stdweb crate which uses 'cargo web build' subcommand. Also the app dependency chain needs buf_redux crate. The 'cargo web build' causes error when building bug_redux. The error is message is below. Please advice how to resolve the issue:
cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.1 dude@ubuntu:~/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.1$ cargo web build Compiling safemem v0.2.0 Compiling memchr v2.2.0 Compiling buf_redux v0.8.1 (/home/dude/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.1) error[E0463]: can't find crate for
slice_deque
--> src/buffer/slice_deque_buf.rs:14:1 | 14 | extern crate slice_deque; | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate error: aborting due to previous error For more information about this error, tryrustc --explain E0463
. error: Could not compilebuf_redux
.To learn more, run the command again with --verbose. error: build failed