Skip to content
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

fix: no-std compatibility tweak (#1) #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Slesarew
Copy link

Problem

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants