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

Flag miniz_oxide as a #![no_std] library #81

Merged
merged 2 commits into from
Jun 17, 2020

Conversation

alexcrichton
Copy link
Contributor

This commit conversion the miniz_oxide crate to a #![no_std]
library, and is as a result a breaking change for the library. Currently
the only dependency on the std crate is the std::io::Cursor type,
which is pretty easily replaced with a usize parameter in a few
locations.

The goal of this commit is to eventually enable this library to be
included into the standard library itself. Dependencies of the standard
library can't depend on the standard library as well! The reason for
including this in the standard library is that the backtrace crate
wants to decompress DWARF information in executables, which can be
compressed with zlib.

This commit conversion the `miniz_oxide` crate to a `#![no_std]`
library, and is as a result a breaking change for the library. Currently
the only dependency on the `std` crate is the `std::io::Cursor` type,
which is pretty easily replaced with a `usize` parameter in a few
locations.

The goal of this commit is to eventually enable this library to be
included into the standard library itself. Dependencies of the standard
library can't depend on the standard library as well! The reason for
including this in the standard library is that the `backtrace` crate
wants to decompress DWARF information in executables, which can be
compressed with zlib.
@alexcrichton
Copy link
Contributor Author

I realize that this is a large-ish change to this library, so I'm happy to answer any questions as well about this if y'all have any!

@alexcrichton
Copy link
Contributor Author

I should also mention that this will need some dependency and feature voodoo to actually enable it to build as part of libstd's dependency chain, but this needs to wait for that PR to be merged/published so it can enable the feature here.

@alexcrichton
Copy link
Contributor Author

With remram44/adler32-rs#15 merged I've updated the manifest here as well to be suitable for compiling as part of libstd itself.

@oyvindln
Copy link
Collaborator

This looks good to me so far.

@oyvindln oyvindln merged commit 7f5aedd into Frommi:master Jun 17, 2020
@alexcrichton alexcrichton deleted the no-std branch June 17, 2020 14:00
@alexcrichton
Copy link
Contributor Author

@oyvindln mind publishing this too to crates.io as 0.4.0 so I can start updating deps to include it for libstd?

@oyvindln
Copy link
Collaborator

Will do once I've looked over everything.

@oyvindln
Copy link
Collaborator

Okay, it's up, and includes #83

@alexcrichton
Copy link
Contributor Author

Thanks!

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