paritytech / libsecp256k1

Pure Rust Implementation of secp256k1.
Apache License 2.0
175 stars 84 forks source link

Fix no_std builds attempt 2 #78

Closed trevor-crypto closed 2 years ago

trevor-crypto commented 3 years ago

Relates to #71

athei commented 2 years ago

The CI should check whether no_std builds are working. Any idea why this wasn't caught there?

trevor-crypto commented 2 years ago

The CI should check whether no_std builds are working. Any idea why this wasn't caught there?

@athei I don't think that actually checks against a no-std target. You need to add a target like thumbv6m-none-eabi and build for no_std with cargo build --target thumbv6m-none-eabi --no-default-features

athei commented 2 years ago

The only difference I see is that your command line is cross compiling where the CI does not. Both use --no-default-features. It that correct?

trevor-crypto commented 2 years ago

@athei they both use --no-default-features but that doesn't guarantee that the library will build successfully for a target without std. You can also use something like https://github.com/hobofan/cargo-nono to do a check