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

Cannot build in -Z build-std with #![no_std] #106

Closed
nbdd0121 opened this issue Oct 19, 2021 · 5 comments
Closed

Cannot build in -Z build-std with #![no_std] #106

nbdd0121 opened this issue Oct 19, 2021 · 5 comments

Comments

@nbdd0121
Copy link

I tried to depend on miniz_oxide on a #![no_std] crate with -Z build-std option used for buidling. However miniz_oxide will depend on std instead of alloc due to cuviper/autocfg#34.

Perhaps it'll be better to detect presence of alloc by rust version instead?

@oyvindln
Copy link
Collaborator

I think autocfg was used as it was the most straight forward way to support older releases where alloc didn't yet exist, but maybe we could do a minimum version bump or something now.

@nbdd0121
Copy link
Author

Rust 1.36 is released in 4 July 2019, so a MSRV bump doesn't sound too bad. Does miniz_oxide has a MSRV policy?

@oyvindln
Copy link
Collaborator

oyvindln commented Oct 27, 2021

Previously we've gone with wanting to support at least the version available in stable debian, so bumping to 1.36 should be no issue. Current debian 11 has 1.48, prev debian 10 has 1.41. Should probably do a version bump for it though since the MSRV changes.

@oyvindln
Copy link
Collaborator

oyvindln commented Nov 1, 2021

Ok, latest commit removes autocfg entirely, MSRV is bumped to 1.40 rather than 1.36 to also be able to use non_exhaustive. Can you check if this fixes the problem?

Will put up a new release soon, but going to have a quick look at whether I can include a fix/update to first #105 since we're bumping the version.

@nbdd0121
Copy link
Author

nbdd0121 commented Nov 1, 2021

I can confirm that it's fixed.

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

No branches or pull requests

2 participants