-
-
Notifications
You must be signed in to change notification settings - Fork 463
Fix no_std compatibility issues #1173
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
Conversation
- using min_const_gen on no_std fails to compile because of a bad import - sample_efraimidis_spirakis only requires alloc but it was marked with a std requirement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Any tests you'd recommend adding (.github/workflows/test.yml
)?
I added |
I also had to revert |
We could use our |
.github/workflows/test.yml
Outdated
cargo build --target ${{ matrix.target }} --no-default-features --features alloc,getrandom,small_rng,min_const_gen | ||
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features --features=alloc,getrandom,small_rng,min_const_gen | ||
cargo build --target ${{ matrix.target }} --no-default-features --features alloc,getrandom,small_rng | ||
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features --features=alloc,getrandom,small_rng |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't min_const_gen
work on stable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would, but I was getting errors in the CI, but perhaps they were other kinds of errors. I don't have a good way to test the CI, so maybe one of the maintainers should put the flag in the right place.
I'm not sure how to invoke the |
It's not something we are currently using in this crate, but rather in Furthermore, we need to decide whether we are actucally ok with introducing an additional dependency into |
Ok, makes sense. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good now, except that min_const_gen
is no longer tested on stable. This needs to be fixed before merging.
The nightly test issue looks to be related to rust-lang/packed_simd#329. That's been fixed with a point release, so I think the tests would pass if they could be re-run? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine now with the changes from #1175.
Thanks for the contribution, @bhgomes! |
features = ["min_const_gen"]
onno_std
fails to compile because of a bad import.sample_efraimidis_spirakis
algorithm only requiresalloc
but it was marked with astd
requirement.std
withcore
in places where the standard library usescore
.