I'm using an extern crate in my Substrate 1.0 runtime module (based on node-template
) which gives a compile error of
duplicate lang item in crate 'std' (which 'myexternalcrate' depends on): 'panic_impl'.
= note: first defined in crate `sr_io` (which `node_template_runtime` depends on).
If I understand the message correctly then I think this might be a common problem if developers want to include external crates that rely on std
features which already implemented in sr-io
, but I'm not sure if that is correct.
I have seen this issue here, which appears to have been fixed in sr-io
but that does not appear to be the cause here.
Is their another approach to resolve this?
EDIT: Adding in changes to Cargo.toml
We are attempting to pull in crate called nacl
[dependencies]
nacl = {version = "0.3.0", default-features = false}
Added in lib.rs
extern crate nacl;
in the runtime module
use nacl::public_box::*;