-
Notifications
You must be signed in to change notification settings - Fork 17
pwasm-abi-derive is not compatible with no-std libs #54
Comments
It's expected. |
None I'm aware of. When I had to bisect which crate pulled std library in, I simply ran a build with |
Well, afaik |
Maybe it's caused by
? |
@Pzixel no it shouldn't.. |
This code compiles fine: #![feature(lang_items)]
#![no_std]
extern crate pwasm_std;
#[macro_use]
extern crate serde_derive;
extern crate serde;
#[lang = "eh_unwind_resume"]
#[no_mangle]
pub extern fn rust_eh_unwind_resume() {} [package]
name = "issue54"
version = "0.1.0"
authors = ["Psilon <[email protected]>"]
[dependencies]
pwasm-std = "0.9.2"
serde_derive = { version = "1.0.70", default-features = false }
serde = { version = "1.0.70", default-features = false }
[lib]
crate-type = ["cdylib"]
[profile.release]
panic = "abort"
lto = true
opt-level = "z" Investigting further.. |
I cloned latest [dependencies]
pwasm-abi = { path = "..", version = "0.1" }
quote = "0.3"
syn = { version = "0.11", features = ["full"] }
tiny-keccak = { version = "1", default-features = false }
byteorder = { version = "1", default-features = false }
parity-hash = { version = "1", default-features = false }
serde = { version = "1", default-features = false }
serde_derive = { version = "1", default-features = false } that works, but if we add [dependencies]
pwasm-abi = { path = "..", version = "0.1" }
quote = "0.3"
syn = { version = "0.11", features = ["full"] }
tiny-keccak = { version = "1", default-features = false }
byteorder = { version = "1", default-features = false }
parity-hash = { version = "1", default-features = false }
serde = { version = "1", default-features = false }
serde_json = { version = "1", default-features = false }
serde_derive = { version = "1", default-features = false } Then this error happens. |
Possibly related: rust-lang/cargo#4866 rust-lang/cargo#4664 rust-lang/cargo#2589 rust-lang/cargo#4361 rust-lang/cargo#5730 ... |
probably not related check your Cargo.lock, there must be 2 different versions of |
@NikVolf no, there isn't. See repo: https://github.com/Pzixel/issue54 https://github.com/Pzixel/issue54/blob/42157efa3bcdcfc16e76b821a1fa095f902fc5b6/Cargo.lock#L37 There is single |
See #59 |
I've tested it with
serde
, but I'm pretty sure the problem is wider.Sample code
Cargo.toml
Expected result
everything compiles
Actual result:
P.S.
Combinations that work:
Cargo.toml
withoutpwasm-abi-derive = "0.1.2"
lib.rs
withoutextern crate serde;
The text was updated successfully, but these errors were encountered: