LLFourn / secp256kfun

A pure-rust secp256k1 library optimised for fun
BSD Zero Clause License
101 stars 29 forks source link

Feature-gate all nightly features behind a nightly feature #65

Closed thomaseizinger closed 3 years ago

thomaseizinger commented 3 years ago

Attempting to solve #64.

For details see commit messages.

I've encountered three problems so far:

  1. We can't conditionally use extended_key_value_attributes on nightly because we already fail during parsing time for an attribute like #[cfg_attr(feature = "nightly", extended_key_value_attributes)]. However, the feature is being stabilized with 1.54 which is in 10 weeks. Still quite some time away so not sure how to deal with this. For now I've commented it out to make progress on the more important items.
  2. For some reason, rustdoc is mucking around now and can't find OsRng? I suspect it has to do with the new feature resolver I activated as part of the patch but I haven't found a solution yet.
  3. There seems to be an issue where, once we don't use specialization, the g_to_and_from_bytes test fails. If compiled in debug mode, we hit an assertion that the point is not normalized yet. I don't understand the details but you can reproduce the failing test with cargo +stable test point::test::g_to_and_from_bytes --no-default-features