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

Enable build with global context less secure #387

Commits on Jan 27, 2022

  1. Use Deref from core

    We should use `Deref` from `core` since it is available there.
    tcharding committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    7fee8c1 View commit details
    Browse the repository at this point in the history
  2. Use fully qualified path for mem

    When building with --no-default-features the compiler emits:
    
      warning: unused import: `mem`
    
    The call site is feature gated so we either need to feature gate the
    import or use a fully qualified path. Since 'core' is quite short elect
    to use the fully qualified path.
    tcharding committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    80813b0 View commit details
    Browse the repository at this point in the history
  3. Implement Debug when no std feature

    Currently we cannot build cleanly with `--no-default-features`.
    
    The `Debug` implementation for secrets is feature gated on `std` because
    it uses a hasher from `std`. If `bitcoin_hashes` is enabled we can use
    it for hashing. If neither `std` nor `bitcoin_hashes` is enabled fall
    back to outputting:
    
       <secret requires std or bitcoin_hashes feature to display>
    tcharding committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    2aae5ef View commit details
    Browse the repository at this point in the history
  4. Enable build with global-context-less-secure

    Currently this command fails:
    
     cargo build --no-default-features --features=global-context-less-secure
    
    All features should be able to be built individually, this is currently
    not the case with `global-context-less-secure`.
    
    Enable `std` if `global-context-less-secure` is enabled (because `Once`
    only comes from `std`, not available in `core`).
    
    Add `global-context-less-secure` to the features test array in
    `contrib/test.sh`.
    
    With this applied the build command above runs successfully.
    tcharding committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    bc7e38b View commit details
    Browse the repository at this point in the history