This repository was archived by the owner on Mar 14, 2025. It is now read-only.
  
  
  
  
fix: no-std compatibility tweak (#1) #146
                
     Open
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Problem
Current
sp-corecrate (version7.0.0) with featurefull_cryptodepends onlibsecp256k1crate withversion = "0.7", default-features = false, features = ["static-context"].full_cryptois a feature intended forno_stdsupport andlibsecp256k1withdefault-features = falseis supposed to work withno_std. However,libsecp256k1withdefault-features = falsecurrently does not compile at least on targetsthumbv7m-none-eabiandthumbv7em-none-eabicausingsp-coreinfull_cryptoto not compile as well.Possible fix
[build-dependencies]containlibsecp256k1-gen-ecmultandlibsecp256k1-gen-genmult, both depending onlibsecp256k1-corewith default features (i.e. instdmode).If the
Cargo.tomlfiles for bothlibsecp256k1-gen-ecmultandlibsecp256k1-gen-genmultare changed to havelibsecp256k1-corewithdefault-features = false, things keep building as before instdand begin to build inno-stdas well.Also, a few dependencies (
serdeandbase64) 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.