-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duplicate item in crate core
#56
Comments
Hm, I can't seem to reproduce. What version of nightly are you using? |
@ehuss chao@DESKTOP-B79IRTG:~/rust-playground/hello$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/chao/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
1.40.0-x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
riscv64gc-unknown-linux-gnu
riscv64gc-unknown-none-elf
wasm32-wasi
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
active toolchain
----------------
stable-x86_64-unknown-linux-gnu (default)
rustc 1.42.0 (b8cedc004 2020-03-09) |
That doesn't show the nightly version you are using. |
OOPS chao@DESKTOP-B79IRTG:~/rust-playground/hello$ rustc +nightly -V
rustc 1.44.0-nightly (f509b26a7 2020-03-18) |
|
@ehuss |
Which exact version did you use? |
@ehuss |
I'm getting the same error with @chaozju, did you use panic="abort"? panic="abort" also works when using |
@dbdr It works, THX |
Hi, I got the same error with Cargo.toml: [package]
name = "rust_issue"
version = "0.1.0"
authors = ["gmorer"]
edition = "2018"
[lib]
crate-type = ["lib"]
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
[dependencies]
wasm-bindgen = "0.2" src/lib.rs: #![no_std]
extern crate alloc;
use alloc::boxed::Box;
pub fn my_fn() -> i32 {
let mem = Box::new(4);
*mem
} compile line: cargo build --target=wasm32-unknown-unknown -Z build-std=alloc,panic_abort Got the following error:
|
@gmorer you have to ensure your dependencies do not use wasm-bindgen = {version="0.2", default-features=false} However, it looks like wasm-bindgen is broken in no_std environments. This line assumes |
Tested with: CARGO_PROFILE_DEV_PANIC=unwind \ cargo test -Zbuild-std=std --target x86_64-unknown-linux-gnu (Changing panic to unwind avoids rust-lang/wg-cargo-std-aware#56)
Tested with: CARGO_PROFILE_DEV_PANIC=unwind \ cargo test -Zbuild-std=std --target x86_64-unknown-linux-gnu (Changing panic to unwind avoids rust-lang/wg-cargo-std-aware#56)
I'm going to close as it isn't clear that there is an issue here. Better panic support is tracked in #29, and it looks like the wasm_bindgen issue was an issue with an external package. |
I had a similar problem and passing |
I am testing with hello world case for
build-std
featuremy code
then got
and
The text was updated successfully, but these errors were encountered: