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

No standard library (no_std) support #6

Merged
merged 11 commits into from
Mar 19, 2024

Conversation

nyonson
Copy link
Collaborator

@nyonson nyonson commented Mar 19, 2024

Created a crate feature flag which gates all implementation details which require the standard library. This feature flag is on by default, but follows the standard pattern where it can be disabled with the default-features flag. BIP324's own deps have been cleaned up to only pull in std deps when necessary.

Added a new CI check to make sure the library is actually no_std compliant. Introduced the cross dependency to do this since it was a little flaky locally, hopefully not too much trouble in CI.

The Random Number Generator std dep required some minor interface tweaks where the RNG is passed down implicitly if called from a function that is only built for std.

All allocation dependencies are now explicit, but would need another rev to add another feature flag, e.g. alloc, and gate that functionality as well. I think we would have to tweak some interfaces so kicked that can for the time being.

@rustaceanrob rustaceanrob reopened this Mar 19, 2024
@rustaceanrob rustaceanrob requested review from rustaceanrob and removed request for rustaceanrob March 19, 2024 20:10
@rustaceanrob rustaceanrob merged commit 16479af into rust-bitcoin:main Mar 19, 2024
6 checks passed
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.

2 participants