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

Make the -sys crate optional #703

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

Commits on Jul 5, 2024

  1. Make the -sys crate optional

    Downstream projects, such as `bitcoin` are using types from this crate
    and need to compile the C code even if they only use the types for
    checking validity of the data and don't perform cryptographic
    operations. Compiling C code is slow and unreliable so there was desire
    to avoid this.
    
    This commit introduces pure Rust implementation of basic
    non-cryptographic operations (is point on the curve, decompression of
    point, secret key constant time comparisons) and feature-gates
    cryptographic operations on `secp256k1-sys` which is now optional. To
    make use of this, downstream crates will have to deactivate the feature
    and possibly feature gate themselves.
    
    The implementation requires a U256 type which was copied from the
    `bitcoin` crate. We don't depend on a common crate to avoid needless
    compilation when the feature is turned on.
    
    This is a breaking change because users who did cryptographic operations
    with `default-features = false` will get compilation errors until they
    enable the feature.
    Kixunil committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    69256fd View commit details
    Browse the repository at this point in the history