Flag miniz_oxide as a #![no_std] library#81
Merged
oyvindln merged 2 commits intoFrommi:masterfrom Jun 17, 2020
Merged
Conversation
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.
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! |
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. |
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. |
Collaborator
|
This looks good to me so far. |
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? |
Collaborator
|
Will do once I've looked over everything. |
Collaborator
|
Okay, it's up, and includes #83 |
Contributor
Author
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit conversion the
miniz_oxidecrate to a#![no_std]library, and is as a result a breaking change for the library. Currently
the only dependency on the
stdcrate is thestd::io::Cursortype,which is pretty easily replaced with a
usizeparameter in a fewlocations.
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
backtracecratewants to decompress DWARF information in executables, which can be
compressed with zlib.