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

Clean up feature flags make things compile with alloc and --no-default-features #132

Merged
merged 3 commits into from
Nov 24, 2022

Conversation

LLFourn
Copy link
Owner

@LLFourn LLFourn commented Oct 19, 2022

I've noticed that secp256kfun doesn't actually compile with --no-default-features. This is weird because we test it. The problem is that it works at the workspace root but if you cd into the directory and run the same command it breaks. According to rust-lang/cargo#4753 this issue as been fixed ages ago but it's happening for me.

So this PR is for investigating this and cleaning up feature flags in general.

@LLFourn LLFourn changed the title Clean up feature flags Clean up feature flags make things compile with alloc and --no-default-features Oct 19, 2022
And test packages explicitly because cargo test from workspace seems to
be broken.
@LLFourn LLFourn force-pushed the clean_up_feature_falgs branch 3 times, most recently from 1137edc to b57895f Compare November 23, 2022 08:09
@LLFourn
Copy link
Owner Author

LLFourn commented Nov 23, 2022

The original problem seems to be a bug in cargo that I can't find reference to anywhere. The work around is to test each package independently.

I've pushed some commits to use the new cargo features available in v1.60.0. Now the dependencies section for schnorr_fun looks like:

[dependencies]
secp256kfun = { path = "../secp256kfun", version = "0.7.1",  default-features = false }

🎉

and that's it! I've managed to re-export serde which I could never figure out how to do before.

Now ecdsa_fun's adaptor feature can be used without serde (this was impossible to arrange before).

I think I'll go ahead and try and add some "only if this feature is enabled" doc thingos and that will be it for this PR.

@LLFourn LLFourn merged commit da6ffd2 into master Nov 24, 2022
@LLFourn LLFourn deleted the clean_up_feature_falgs branch November 24, 2022 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant