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

Add tests for no_std #68

Closed
yoshuawuyts opened this issue Nov 14, 2022 · 4 comments
Closed

Add tests for no_std #68

yoshuawuyts opened this issue Nov 14, 2022 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@yoshuawuyts
Copy link
Owner

The traits themselves are compatible with no_std, and the implementations for array and tuple should be compatible with no_std as well. But as we're adding optimizations, we're using things like bitvec to store metadata in, speeding things up - but that may require allocations.

We should author tests to ensure that the traits keep working on no_std environments, even as we add optimizations. On the implementation side we may even want to swap the implementations we provide for no_std environments if it turns out our more optimized approaches are incompatible - but I suspect we may not need to.

Either way: the first step is to author tests and put them in CI so we can ensure that no_std works going forward.

@yoshuawuyts yoshuawuyts added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Nov 14, 2022
@jmintb
Copy link
Contributor

jmintb commented Sep 13, 2023

I would like to take a stab at this if it is still relevant?

@yoshuawuyts
Copy link
Owner Author

Yes please!

jmintb added a commit to jmintb/futures-concurrency that referenced this issue Oct 14, 2023
This commit implements a test for each trait in a no std environment,
ensuring compatibility with such an environment.

This addresses issue yoshuawuyts#68.
@alexmoon
Copy link
Contributor

FYI, I don't think #159 actually does anything. I believe the #![no-std] directive in the test file just prevents use of the standard library in the test, but the lib still pulls in std since it does not have a #![no-std] directive. I've opened #163 to add no-std support to the crate. On that branch you can run cargo test --no-default-features to run no-std tests.

@yoshuawuyts
Copy link
Owner Author

I believe #163 closes this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants