Current sp-core crate (version 7.0.0) with feature full_crypto depends on libsecp256k1 crate with version = "0.7", default-features = false, features = ["static-context"].
full_crypto is a feature intended for no_std support and libsecp256k1 with default-features = false is supposed to work with no_std. However, libsecp256k1 with default-features = false currently does not compile at least on targets thumbv7m-none-eabi and thumbv7em-none-eabi causing sp-core in full_crypto to not compile as well.
Possible fix
[build-dependencies] contain libsecp256k1-gen-ecmult and libsecp256k1-gen-genmult, both depending on libsecp256k1-core with default features (i.e. in std mode).
If the Cargo.toml files for both libsecp256k1-gen-ecmult and libsecp256k1-gen-genmult are changed to have libsecp256k1-core with default-features = false, things keep building as before in std and begin to build in no-std as well.
Also, a few dependencies (serde and base64) get used only in std, but were not marked as optional = true, although this does not affect buildability.
We will maintain a thus fixed version of the crate for Kampela development and switch to this upstream if the issue gets resolved.
Problem
Current
sp-core
crate (version7.0.0
) with featurefull_crypto
depends onlibsecp256k1
crate withversion = "0.7", default-features = false, features = ["static-context"]
.full_crypto
is a feature intended forno_std
support andlibsecp256k1
withdefault-features = false
is supposed to work withno_std
. However,libsecp256k1
withdefault-features = false
currently does not compile at least on targetsthumbv7m-none-eabi
andthumbv7em-none-eabi
causingsp-core
infull_crypto
to not compile as well.Possible fix
[build-dependencies]
containlibsecp256k1-gen-ecmult
andlibsecp256k1-gen-genmult
, both depending onlibsecp256k1-core
with default features (i.e. instd
mode). If theCargo.toml
files for bothlibsecp256k1-gen-ecmult
andlibsecp256k1-gen-genmult
are changed to havelibsecp256k1-core
withdefault-features = false
, things keep building as before instd
and begin to build inno-std
as well. Also, a few dependencies (serde
andbase64
) get used only instd
, but were not marked asoptional = true
, although this does not affect buildability.We will maintain a thus fixed version of the crate for Kampela development and switch to this upstream if the issue gets resolved.